Closed wcampbell0x2a closed 2 months ago
This would be pretty useful in my project. Anything I can assist with to get this merged?
This would be pretty useful in my project. Anything I can assist with to get this merged?
We need https://github.com/no-std-io/no-std-io/pull/5 and a final review by me and @sharksforarms
This would be pretty useful in my project. Anything I can assist with to get this merged?
We need no-std-io/no-std-io#5 and a final review by me and @sharksforarms
Decided to just fork that repo and use my own no-std-io2
for now, since that wasn't getting merged and i've tried contacting them a couple of times.
Thanks! This is great. This got me thinking, it would be pretty cool if there was a way to add attributes like this without adding bounds to the generic, such that "seek_" could only be used if
T
isSeek
, else it would be a compile error. This way, we don't impose more bounds than necessary?The downside of this PR is that now types are now required to be
Seek
(maybe less of a concern with the reader interface... but I can for-see some folks not liking this, maybe?)
I'm not sure about any solutions that includes generic bounds, I think you'll always need to have Seek
as a bounds on Reader
, unless i'm wrong.
the friends at binrw
'solve' this by having a NoSeek
the friends at
binrw
'solve' this by having a NoSeek
Ah! Indeed. It was likely enough of a pain point to include something in the library.
Seek
toReader
andWriter
as_mut
toReader
, and testsseek_rewind
,seek_from_current
,seek_from_end
,seek_from_start
,See https://github.com/sharksforarms/deku/issues/105
Currently being used in https://github.com/wcampbell0x2a/cpio-deku