isr_macros::__private

Struct Profile

Source
pub struct Profile<'a> { /* private fields */ }
Expand description

Profile.

Contains information about the target architecture, symbols, and types.

Implementations§

Source§

impl<'a> Profile<'a>

Source

pub fn new( architecture: Cow<'a, str>, symbols: Symbols<'a>, types: Types<'a>, ) -> Profile<'a>

Creates a new profile.

Source

pub fn symbols(&self) -> impl Iterator<Item = (&str, &u64)>

Returns an iterator over the symbols.

Source

pub fn types(&self) -> &Types<'_>

Returns the types.

Source

pub fn type_size(&self, type_: &Type<'_>) -> Option<u64>

Returns the size of a given type in bytes.

Source

pub fn base_size(&self, base: &BaseRef) -> u64

Returns the size of a base type in bytes.

Source

pub fn enum_size(&self, name: &str) -> Option<u64>

Returns the size of an enum type in bytes.

Source

pub fn struct_size(&self, name: &str) -> Option<u64>

Returns the size of a struct type in bytes.

Source

pub fn pointer_size(&self) -> u64

Returns the size of a pointer in bytes.

Source

pub fn find_symbol(&self, symbol_name: &str) -> Option<u64>

Finds a symbol by name.

Source

pub fn find_enum(&self, type_name: &str) -> Option<&Enum<'_>>

Finds an enum by name.

Source

pub fn find_struct(&self, type_name: &str) -> Option<&Struct<'_>>

Finds a struct by name.

Trait Implementations§

Source§

impl<'a> Debug for Profile<'a>

Source§

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

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

impl<'de, 'a> Deserialize<'de> for Profile<'a>
where 'de: 'a,

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Profile<'a>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ProfileExt for Profile<'_>

Source§

fn find_field(&self, type_name: &str, field_name: &str) -> Option<Field>

Source§

fn find_bitfield(&self, type_name: &str, field_name: &str) -> Option<Bitfield>

Source§

fn find_symbol_descriptor( &self, symbol_name: &str, ) -> Result<SymbolDescriptor, Error>

Source§

fn find_field_descriptor( &self, type_name: &str, field_name: &str, ) -> Result<FieldDescriptor, Error>

Source§

impl<'a> Serialize for Profile<'a>

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,