pub struct RawBody(pub Vec<u8>);Expand description
A body kept verbatim: bytes in, bytes out, checksum verified, nothing decoded.
For formats whose body is not yet mapped, for one parsed as a borrowed view over
these bytes rather than a bit-mapped struct (npno), and for wire code that moves
bodies whole. ⚠️ Allocates the body — a library-sized file wants inspect,
which holds O(1), not a RawBody.
Tuple Fields§
§0: Vec<u8>Trait Implementations§
Source§impl Body for RawBody
impl Body for RawBody
Source§fn read<R: Read + Seek>(
r: &mut BodyReader<'_, R>,
_: &Header,
) -> Result<RawBody, Error>
fn read<R: Read + Seek>( r: &mut BodyReader<'_, R>, _: &Header, ) -> Result<RawBody, Error>
Decode from
r, which is scoped to the body: position 0 is the first body
byte and BodyReader::len is known. header is for version gating and
location/aux interpretation, not for layout — the container already
consumed the header bytes.impl Eq for RawBody
impl StructuralPartialEq for RawBody
Auto Trait Implementations§
impl Freeze for RawBody
impl RefUnwindSafe for RawBody
impl Send for RawBody
impl Sync for RawBody
impl Unpin for RawBody
impl UnsafeUnpin for RawBody
impl UnwindSafe for RawBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.