pub struct Types<'a> {
pub definitions: &'a dyn Definitions,
}Expand description
Navigates types through a set of definitions.
Fields§
§definitions: &'a dyn DefinitionsImplementations§
Source§impl<'a> Types<'a>
impl<'a> Types<'a>
pub fn new(definitions: &'a dyn Definitions) -> Self
Sourcepub fn lookup(&self, ty: &Type, name: &str) -> Lookup
pub fn lookup(&self, ty: &Type, name: &str) -> Lookup
The element name of ty, declared or inherited.
Sourcepub fn element_type(&self, element: &ElementRef, chosen: Option<&str>) -> Type
pub fn element_type(&self, element: &ElementRef, chosen: Option<&str>) -> Type
The type of an element: its backbone, the content it references, or its type. chosen
picks the type of a choice element.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Types<'a>
impl<'a> !Send for Types<'a>
impl<'a> !Sync for Types<'a>
impl<'a> !UnwindSafe for Types<'a>
impl<'a> Freeze for Types<'a>
impl<'a> Unpin for Types<'a>
impl<'a> UnsafeUnpin for Types<'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