[][src]Struct ddbug_parser::Function

pub struct Function<'input> { /* fields omitted */ }

A function.

Implementations

impl<'input> Function<'input>[src]

pub fn id(&self) -> usize[src]

The user defined id for this function.

pub fn set_id(&self, id: usize)[src]

Set a user defined id for this function.

pub fn namespace(&self) -> Option<&Namespace<'_>>[src]

The namespace of the function.

pub fn name(&self) -> Option<&str>[src]

The name of the function.

pub fn linkage_name(&self) -> Option<&str>[src]

The linkage name of the variable.

pub fn symbol_name(&self) -> Option<&str>[src]

The symbol name of the function.

This is determined from a symbol table entry with a matching address.

pub fn source(&self) -> &Source<'input>[src]

The source information for the function.

pub fn address(&self) -> Option<u64>[src]

The address of the function.

pub fn size(&self) -> Option<u64>[src]

The size in bytes of the function.

This may exclude padding.

pub fn range(&self) -> Option<Range>[src]

The address range of the function.

pub fn is_inline(&self) -> bool[src]

Return true if this is an inlined function.

pub fn is_declaration(&self) -> bool[src]

Return true if this is a declaration.

pub fn parameters(&self) -> &[ParameterType<'input>][src]

The function parameter types.

pub fn return_type<'a>(
    &self,
    hash: &'a FileHash<'input>
) -> Option<Cow<'a, Type<'input>>>
[src]

The return type.

Returns None if the return type is invalid.

pub fn details(&self, hash: &FileHash<'input>) -> FunctionDetails<'input>[src]

Extra function details.

pub fn cfi(&self, hash: &FileHash<'input>) -> Vec<Cfi>[src]

Call frame information.

pub fn cmp_id(
    _hash_a: &FileHash<'_>,
    a: &Function<'_>,
    _hash_b: &FileHash<'_>,
    b: &Function<'_>
) -> Ordering
[src]

Compare the identifying information of two functions.

Functions are equal if they have the same namespace and name.

This can be used to sort, and to determine if two functions refer to the same definition (even if there are differences in the definitions).

Trait Implementations

impl<'input> Debug for Function<'input>[src]

impl<'input> Default for Function<'input>[src]

Auto Trait Implementations

impl<'input> !RefUnwindSafe for Function<'input>[src]

impl<'input> !Send for Function<'input>[src]

impl<'input> !Sync for Function<'input>[src]

impl<'input> Unpin for Function<'input>[src]

impl<'input> !UnwindSafe for Function<'input>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.