pub struct ReadScope<'a> { /* private fields */ }
Implementations
sourceimpl<'a> ReadScope<'a>
impl<'a> ReadScope<'a>
pub fn new(data: &'a [u8]) -> ReadScope<'a>
pub fn data(&self) -> &'a [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [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<'a, Args = ()>>(
&self
) -> Result<T::HostType, ParseError>
pub fn read_dep<T: ReadBinaryDep<'a>>(
&self,
args: T::Args
) -> Result<T::HostType, ParseError>
pub fn read_cache<'b, T>(
&self,
cache: &mut ReadCache<T::HostType>
) -> Result<Rc<T::HostType>, ParseError>where
T: 'static + ReadBinaryDep<'a, Args = ()>,
pub fn read_cache_state<'b, T, Table>(
&self,
cache: &mut ReadCache<T::HostType>,
state: LayoutCache<Table>
) -> Result<Rc<T::HostType>, ParseError>where
T: 'static + ReadBinaryDep<'a, Args = LayoutCache<Table>>,
Table: LayoutTableType,
Trait Implementations
sourceimpl<'a> PartialEq<ReadScope<'a>> for ReadScope<'a>
impl<'a> PartialEq<ReadScope<'a>> for ReadScope<'a>
sourceimpl<'a> WriteBinary<ReadScope<'a>> for ReadScope<'a>
impl<'a> WriteBinary<ReadScope<'a>> for ReadScope<'a>
sourcefn write<C: WriteContext>(ctxt: &mut C, scope: Self) -> Result<(), WriteError>
fn write<C: WriteContext>(ctxt: &mut C, scope: Self) -> Result<(), WriteError>
Write the binary representation of Self to
ctxt
.impl<'a> StructuralPartialEq for ReadScope<'a>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by
write_dep
.sourcefn 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
.