Struct goblin::container::Ctx [−][src]
A binary parsing context, including the container size and underlying byte endianness
Fields
container: Container
le: Endian
Implementations
impl Ctx
[src]
pub fn is_big(self) -> bool
[src]
Whether this binary container context is “big” or not
pub fn is_little_endian(self) -> bool
[src]
Whether this binary container context is little endian or not
pub fn new(container: Container, le: Endian) -> Self
[src]
Create a new binary container context
pub fn size(self) -> usize
[src]
Return a dubious pointer/address byte size for the container
Trait Implementations
impl Clone for Ctx
[src]
impl Copy for Ctx
[src]
impl Debug for Ctx
[src]
impl Default for Ctx
[src]
impl From<Container> for Ctx
[src]
impl From<Endian> for Ctx
[src]
impl IntoCtx<Ctx, [u8]> for CompressionHeader
[src]
impl IntoCtx<Ctx, [u8]> for Header
[src]
impl IntoCtx<Ctx, [u8]> for SectionHeader
[src]
impl IntoCtx<Ctx, [u8]> for Sym
[src]
impl IntoCtx<Ctx, [u8]> for Header
[src]
impl IntoCtx<Ctx, [u8]> for Section
[src]
impl<'a> IntoCtx<Ctx, [u8]> for Segment<'a>
[src]
impl IntoCtx<Ctx, [u8]> for Nlist
[src]
impl PartialEq<Ctx> for Ctx
[src]
impl SizeWith<Ctx> for CompressionHeader
[src]
impl SizeWith<Ctx> for Header
[src]
impl SizeWith<Ctx> for ProgramHeader
[src]
impl SizeWith<Ctx> for SectionHeader
[src]
impl SizeWith<Ctx> for Sym
[src]
impl SizeWith<Ctx> for Dyn
[src]
impl SizeWith<Ctx> for Header
[src]
impl SizeWith<Ctx> for Section
[src]
impl<'a> SizeWith<Ctx> for Segment<'a>
[src]
impl SizeWith<Ctx> for Nlist
[src]
impl StructuralPartialEq for Ctx
[src]
impl<'a> TryFromCtx<'a, Ctx, [u8]> for CompressionHeader
[src]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
[src]
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
impl<'a> TryFromCtx<'a, Ctx, [u8]> for ProgramHeader
[src]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
[src]
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
impl<'a> TryFromCtx<'a, Ctx, [u8]> for SectionHeader
[src]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
[src]
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
impl<'a> TryFromCtx<'a, Ctx, [u8]> for Sym
[src]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
[src]
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
impl<'a> TryFromCtx<'a, Ctx, [u8]> for Dyn
[src]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
[src]
bytes: &'a [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize), Self::Error>
impl<'a> TryFromCtx<'a, Ctx, [u8]> for Header
[src]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
container::Ctx { le: le, container: container }: Ctx
) -> Result<(Self, usize)>
[src]
bytes: &'a [u8],
container::Ctx { le: le, container: container }: Ctx
) -> Result<(Self, usize)>
impl<'a> TryFromCtx<'a, Ctx, [u8]> for Section
[src]
type Error = Error
fn try_from_ctx(bytes: &'a [u8], ctx: Ctx) -> Result<(Self, usize), Self::Error>
[src]
impl<'a> TryFromCtx<'a, Ctx, [u8]> for Nlist
[src]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
container::Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize)>
[src]
bytes: &'a [u8],
container::Ctx { container: container, le: le }: Ctx
) -> Result<(Self, usize)>
impl TryIntoCtx<Ctx, [u8]> for CompressionHeader
[src]
type Error = Error
fn try_into_ctx(
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
[src]
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
impl TryIntoCtx<Ctx, [u8]> for ProgramHeader
[src]
type Error = Error
fn try_into_ctx(
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
[src]
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
impl TryIntoCtx<Ctx, [u8]> for SectionHeader
[src]
type Error = Error
fn try_into_ctx(
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
[src]
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
impl TryIntoCtx<Ctx, [u8]> for Sym
[src]
type Error = Error
fn try_into_ctx(
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
[src]
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
impl TryIntoCtx<Ctx, [u8]> for Dyn
[src]
type Error = Error
fn try_into_ctx(
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
[src]
self,
bytes: &mut [u8],
Ctx { container: container, le: le }: Ctx
) -> Result<usize, Self::Error>
impl TryIntoCtx<Ctx, [u8]> for Header
[src]
impl TryIntoCtx<Ctx, [u8]> for Section
[src]
type Error = Error
fn try_into_ctx(self, bytes: &mut [u8], ctx: Ctx) -> Result<usize, Self::Error>
[src]
impl<'a> TryIntoCtx<Ctx, [u8]> for Segment<'a>
[src]
type Error = Error
fn try_into_ctx(self, bytes: &mut [u8], ctx: Ctx) -> Result<usize, Self::Error>
[src]
impl TryIntoCtx<Ctx, [u8]> for Nlist
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ctx
impl Send for Ctx
impl Sync for Ctx
impl Unpin for Ctx
impl UnwindSafe for Ctx
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,