pub struct ReadScope<'a> { /* private fields */ }Implementations§
Source§impl<'a> ReadScope<'a>
impl<'a> ReadScope<'a>
pub fn new(data: &'a [u8]) -> ReadScope<'a>
pub fn data(&self) -> &'a [u8] ⓘ
pub fn offset(&self, offset: usize) -> ReadScope<'a>
pub fn offset_length( &self, offset: usize, length: usize, ) -> Result<ReadScope<'a>, ParseError>
pub fn ctxt(&self) -> ReadCtxt<'a>
pub fn read<T: ReadBinaryDep<Args<'a> = ()>>( &self, ) -> Result<T::HostType<'a>, ParseError>
pub fn read_dep<T: ReadBinaryDep>( &self, args: T::Args<'a>, ) -> Result<T::HostType<'a>, ParseError>
pub fn read_cache<T>(
&self,
cache: &mut ReadCache<T::HostType<'a>>,
) -> Result<Rc<T::HostType<'a>>, ParseError>where
T: 'static + ReadBinaryDep<Args<'a> = ()>,
pub fn read_cache_state<T, Table>( &self, cache: &mut ReadCache<T::HostType<'a>>, state: LayoutCache<Table>, ) -> Result<Rc<T::HostType<'a>>, ParseError>
Trait Implementations§
Source§impl<'a> WriteBinary for ReadScope<'a>
impl<'a> WriteBinary for ReadScope<'a>
impl<'a> Copy for ReadScope<'a>
impl<'a> StructuralPartialEq for ReadScope<'a>
Auto Trait Implementations§
impl<'a> Freeze for ReadScope<'a>
impl<'a> RefUnwindSafe for ReadScope<'a>
impl<'a> Send for ReadScope<'a>
impl<'a> Sync for ReadScope<'a>
impl<'a> Unpin for ReadScope<'a>
impl<'a> UnwindSafe for ReadScope<'a>
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
Source§type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by
write_dep.Source§fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
Write the binary representation of Self to
ctxt.