Struct goblin::mach::symbols::Nlist

source ·
pub struct Nlist {
    pub n_strx: usize,
    pub n_type: u8,
    pub n_sect: usize,
    pub n_desc: u16,
    pub n_value: u64,
}

Fields§

§n_strx: usize

index into the string table

§n_type: u8

type flag, see below

§n_sect: usize

section number or NO_SECT

§n_desc: u16

see <mach-o/stab.h>

§n_value: u64

value of this symbol (or stab offset)

Implementations§

source§

impl Nlist

source

pub fn get_type(&self) -> u8

Gets this symbol’s type in bits 0xe

source

pub fn type_str(&self) -> &'static str

Gets the str representation of the type of this symbol

source

pub fn is_global(&self) -> bool

Whether this symbol is global or not

source

pub fn is_weak(&self) -> bool

Whether this symbol is weak or not

source

pub fn is_undefined(&self) -> bool

Whether this symbol is undefined or not

source

pub fn is_stab(&self) -> bool

Whether this symbol is a symbolic debugging entry

Trait Implementations§

source§

impl Clone for Nlist

source§

fn clone(&self) -> Nlist

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Nlist

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Nlist> for Nlist32

source§

fn from(nlist: Nlist) -> Self

Converts to this type from the input type.
source§

impl From<Nlist> for Nlist64

source§

fn from(nlist: Nlist) -> Self

Converts to this type from the input type.
source§

impl From<Nlist32> for Nlist

source§

fn from(nlist: Nlist32) -> Self

Converts to this type from the input type.
source§

impl From<Nlist64> for Nlist

source§

fn from(nlist: Nlist64) -> Self

Converts to this type from the input type.
source§

impl IntoCtx<Ctx> for Nlist

source§

fn into_ctx(self, bytes: &mut [u8], ctx: Ctx)

source§

impl SizeWith<Ctx> for Nlist

source§

impl<'a> TryFromCtx<'a, Ctx> for Nlist

§

type Error = Error

source§

fn try_from_ctx(bytes: &'a [u8], _: Ctx) -> Result<(Self, usize)>

source§

impl TryIntoCtx<Ctx> for Nlist

§

type Error = Error

source§

fn try_into_ctx(self, bytes: &mut [u8], _: Ctx) -> Result<usize, Self::Error>

Auto Trait Implementations§

§

impl Freeze for Nlist

§

impl RefUnwindSafe for Nlist

§

impl Send for Nlist

§

impl Sync for Nlist

§

impl Unpin for Nlist

§

impl UnwindSafe for Nlist

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.