pub struct Profile<'a> { /* private fields */ }
Expand description
Profile.
Contains information about the target architecture, symbols, and types.
Implementations§
Source§impl<'a> Profile<'a>
impl<'a> Profile<'a>
Sourcepub fn new(
architecture: Cow<'a, str>,
symbols: Symbols<'a>,
types: Types<'a>,
) -> Self
pub fn new( architecture: Cow<'a, str>, symbols: Symbols<'a>, types: Types<'a>, ) -> Self
Creates a new profile.
Sourcepub fn symbols(&self) -> impl Iterator<Item = (&str, &u64)>
pub fn symbols(&self) -> impl Iterator<Item = (&str, &u64)>
Returns an iterator over the symbols.
Sourcepub fn type_size(&self, type_: &Type<'_>) -> Option<u64>
pub fn type_size(&self, type_: &Type<'_>) -> Option<u64>
Returns the size of a given type in bytes.
Sourcepub fn struct_size(&self, name: &str) -> Option<u64>
pub fn struct_size(&self, name: &str) -> Option<u64>
Returns the size of a struct type in bytes.
Sourcepub fn pointer_size(&self) -> u64
pub fn pointer_size(&self) -> u64
Returns the size of a pointer in bytes.
Sourcepub fn find_symbol(&self, symbol_name: &str) -> Option<u64>
pub fn find_symbol(&self, symbol_name: &str) -> Option<u64>
Finds a symbol by name.
Sourcepub fn find_struct(&self, type_name: &str) -> Option<&Struct<'_>>
pub fn find_struct(&self, type_name: &str) -> Option<&Struct<'_>>
Finds a struct by name.
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Profile<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Profile<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Profile<'a>
impl<'a> RefUnwindSafe for Profile<'a>
impl<'a> Send for Profile<'a>
impl<'a> Sync for Profile<'a>
impl<'a> Unpin for Profile<'a>
impl<'a> UnwindSafe for Profile<'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