pub enum Object<'a> {
Device(&'a Device),
Block(&'a Block),
Register(&'a Register),
Command(&'a Command),
Buffer(&'a Buffer),
FieldSet(&'a FieldSet),
Enum(&'a Enum),
Extern(&'a Extern),
Field(&'a Field),
EnumVariant(&'a EnumVariant),
}Variants§
Device(&'a Device)
Block(&'a Block)
Register(&'a Register)
Command(&'a Command)
Buffer(&'a Buffer)
FieldSet(&'a FieldSet)
Enum(&'a Enum)
Extern(&'a Extern)
Field(&'a Field)
EnumVariant(&'a EnumVariant)
Implementations§
Source§impl<'a> Object<'a>
impl<'a> Object<'a>
pub fn device_config(&self) -> Option<&'a DeviceConfig>
pub fn child_objects(&self) -> Option<Box<dyn Iterator<Item = ObjectId> + 'a>>
Sourcepub fn name(&self) -> &'a Identifier<RuntimeNamespace>
pub fn name(&self) -> &'a Identifier<RuntimeNamespace>
Get a reference to the name of the specific object
Sourcepub fn description(&self) -> Istr
pub fn description(&self) -> Istr
Get the (markdown) description of the object
Sourcepub fn type_conversion(&self) -> Option<&'a TypeConversion>
pub fn type_conversion(&self) -> Option<&'a TypeConversion>
Return the type conversion value if it exists
pub fn as_enum(&self) -> Option<&'a Enum>
pub fn base_type(&self) -> Option<&'a Spanned<BaseType>>
pub fn allow_address_overlap(&self) -> bool
pub fn short_properties_span(&self) -> Span
pub fn node_type(&self) -> NodeType
Sourcepub fn fieldset_refs(&self) -> Vec<Spanned<FieldsetRef>>
pub fn fieldset_refs(&self) -> Vec<Spanned<FieldsetRef>>
Get the fieldset refs of the object. Only returns non-zero for registers and commands
pub fn properties_span(&self) -> Option<Span>
pub fn body_span(&self) -> Option<Span>
Trait Implementations§
impl<'a> Copy for Object<'a>
impl<'a> StructuralPartialEq for Object<'a>
Auto Trait Implementations§
impl<'a> Freeze for Object<'a>
impl<'a> RefUnwindSafe for Object<'a>
impl<'a> Send for Object<'a>
impl<'a> Sync for Object<'a>
impl<'a> Unpin for Object<'a>
impl<'a> UnsafeUnpin for Object<'a>
impl<'a> UnwindSafe for Object<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreimpl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T> SpanExt for T
impl<T> SpanExt for T
fn with_span(self, span: impl Into<Span>) -> Spanned<Self>where
Self: Sized,
Source§fn spanned(self, span: impl Into<Span>) -> Spanned<Self>where
Self: Sized,
fn spanned(self, span: impl Into<Span>) -> Spanned<Self>where
Self: Sized,
Same as
Self::with_span, but can avoid name collisionsfn with_dummy_span(self) -> Spanned<Self>where
Self: Sized,
fn into_with_dummy_span<T>(self) -> Spanned<T>where
Self: Into<T>,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.