Struct customasm::util::SymbolManager

source ·
pub struct SymbolManager<T> { /* private fields */ }

Implementations§

source§

impl<T> SymbolManager<T>

source

pub fn new(report_as: &'static str) -> SymbolManager<T>

source

pub fn get(&self, item_ref: ItemRef<T>) -> &SymbolDecl<T>

source

pub fn get_mut(&mut self, item_ref: ItemRef<T>) -> &mut SymbolDecl<T>

source

pub fn get_by_name_global( &self, report: &mut Report, span: Span, name: &str ) -> Result<ItemRef<T>, ()>

source

pub fn try_get_by_name<S>( &self, ctx: &SymbolContext, hierarchy_level: usize, hierarchy: &[S] ) -> Option<ItemRef<T>>
where S: Borrow<str> + Debug,

source

pub fn get_by_name<S>( &self, report: &mut Report, span: Span, ctx: &SymbolContext, hierarchy_level: usize, hierarchy: &[S] ) -> Result<ItemRef<T>, ()>
where S: Borrow<str> + Debug,

source

pub fn get_displayable_name<S>( &self, hierarchy_level: usize, hierarchy: &[S] ) -> String
where S: Borrow<str>,

source

pub fn generate_anonymous_name(&self) -> String

source

pub fn declare( &mut self, report: &mut Report, span: Span, ctx: &SymbolContext, name: String, hierarchy_level: usize, kind: SymbolKind ) -> Result<ItemRef<T>, ()>

source

pub fn add_span_ref(&mut self, span: Span, item_ref: ItemRef<T>)

source§

impl SymbolManager<Symbol>

source

pub fn format_default(&self, decls: &ItemDecls, defs: &ItemDefs) -> String

source

pub fn format_mesen_mlb(&self, decls: &ItemDecls, defs: &ItemDefs) -> String

source

pub fn format<FnFormat>( &self, decls: &ItemDecls, defs: &ItemDefs, formatter: &mut FnFormat ) -> String
where FnFormat: FnMut(&mut String, &SymbolDecl<Symbol>, &str, &BigInt),

Trait Implementations§

source§

impl<T: Debug> Debug for SymbolManager<T>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Freeze for SymbolManager<T>

§

impl<T> RefUnwindSafe for SymbolManager<T>
where T: RefUnwindSafe,

§

impl<T> !Send for SymbolManager<T>

§

impl<T> !Sync for SymbolManager<T>

§

impl<T> Unpin for SymbolManager<T>

§

impl<T> UnwindSafe for SymbolManager<T>
where T: RefUnwindSafe,

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

§

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.