pub struct TypeAliasMap { /* private fields */ }Expand description
Bidirectional mapping between typedef names and struct/union tags, plus
GObject-synthesised aliases (Foo ↔ _Foo).
Implementations§
Source§impl TypeAliasMap
impl TypeAliasMap
pub fn build(project: &Project) -> Self
Sourcepub fn canonical<'a>(&'a self, name: &'a str) -> &'a str
pub fn canonical<'a>(&'a self, name: &'a str) -> &'a str
Resolve a typedef name to its underlying struct tag, or return the name unchanged if it is already a tag or has no known alias.
Sourcepub fn typedef_for_tag<'a>(&'a self, tag: &'a str) -> Option<&'a str>
pub fn typedef_for_tag<'a>(&'a self, tag: &'a str) -> Option<&'a str>
Return the typedef alias for a struct tag, if one exists.
Sourcepub fn tag_for_typedef<'a>(&'a self, name: &'a str) -> Option<&'a str>
pub fn tag_for_typedef<'a>(&'a self, name: &'a str) -> Option<&'a str>
Return the struct tag for a typedef name, if one exists.
Sourcepub fn is_referenced(&self, name: &str, refs: &HashSet<String>) -> bool
pub fn is_referenced(&self, name: &str, refs: &HashSet<String>) -> bool
True if name or any of its aliases appears in refs.
Auto Trait Implementations§
impl Freeze for TypeAliasMap
impl RefUnwindSafe for TypeAliasMap
impl Send for TypeAliasMap
impl Sync for TypeAliasMap
impl Unpin for TypeAliasMap
impl UnsafeUnpin for TypeAliasMap
impl UnwindSafe for TypeAliasMap
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more