pub struct SliceArchive<'a>(pub &'a [u8]);Expand description
A whole &[u8] as an archive — what a test and a single-pack caller use.
Tuple Fields§
§0: &'a [u8]Trait Implementations§
Source§impl ArchiveBytes for SliceArchive<'_>
impl ArchiveBytes for SliceArchive<'_>
Source§fn at(&self, at: u64, len: u64) -> Result<Cow<'_, [u8]>>
fn at(&self, at: u64, len: u64) -> Result<Cow<'_, [u8]>>
Up to
len bytes at at. Short is not an error: a probe near the
end of the archive legitimately gets fewer, and the parsers below read a
grammar rather than a fixed width. Empty means “there is nothing there”,
which every caller treats as a corrupt back-reference.Auto Trait Implementations§
impl<'a> Freeze for SliceArchive<'a>
impl<'a> RefUnwindSafe for SliceArchive<'a>
impl<'a> Send for SliceArchive<'a>
impl<'a> Sync for SliceArchive<'a>
impl<'a> Unpin for SliceArchive<'a>
impl<'a> UnsafeUnpin for SliceArchive<'a>
impl<'a> UnwindSafe for SliceArchive<'a>
Blanket Implementations§
impl<T> Allocation for T
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