pub struct Manifest {Show 19 fields
pub description: Istr,
pub name: Spanned<Identifier<Global>>,
pub default_access: Option<Access>,
pub config: DeviceConfig,
pub devices: ObjectArena<Device, DeviceId>,
pub blocks: ObjectArena<Block, BlockId>,
pub registers: ObjectArena<Register, RegisterId>,
pub commands: ObjectArena<Command, CommandId>,
pub buffers: ObjectArena<Buffer, BufferId>,
pub fieldsets: ObjectArena<FieldSet, FieldSetId>,
pub fields: ObjectArena<Field, FieldId>,
pub enums: ObjectArena<Enum, EnumId>,
pub enum_variants: ObjectArena<EnumVariant, EnumVariantId>,
pub externs: ObjectArena<Extern, ExternId>,
pub parent_map: HashMap<ObjectId, Box<[ObjectId]>>,
pub short_properties_span: Span,
pub properties_span: Option<Span>,
pub body_span: Option<Span>,
pub span: Span,
}Fields§
§description: Istr§name: Spanned<Identifier<Global>>§default_access: Option<Access>§config: DeviceConfig§devices: ObjectArena<Device, DeviceId>§blocks: ObjectArena<Block, BlockId>§registers: ObjectArena<Register, RegisterId>§commands: ObjectArena<Command, CommandId>§buffers: ObjectArena<Buffer, BufferId>§fieldsets: ObjectArena<FieldSet, FieldSetId>§fields: ObjectArena<Field, FieldId>§enums: ObjectArena<Enum, EnumId>§enum_variants: ObjectArena<EnumVariant, EnumVariantId>§externs: ObjectArena<Extern, ExternId>§parent_map: HashMap<ObjectId, Box<[ObjectId]>>§short_properties_span: Span§properties_span: Option<Span>§body_span: Option<Span>§span: SpanImplementations§
Source§impl Manifest
impl Manifest
pub fn objects(&self) -> impl Iterator<Item = Object<'_>>
pub fn objects_enumerated(&self) -> impl Iterator<Item = (ObjectId, Object<'_>)>
pub fn objects_mut(&mut self) -> impl Iterator<Item = ObjectMut<'_>>
pub fn objects_enumerated_mut( &mut self, ) -> impl Iterator<Item = (ObjectId, ObjectMut<'_>)>
pub fn object_ids(&self) -> impl Iterator<Item = ObjectId>
pub fn object(&self, id: impl Into<ObjectId>) -> Option<Object<'_>>
pub fn object_mut(&mut self, id: impl Into<ObjectId>) -> Option<ObjectMut<'_>>
Sourcepub fn search_object<T: Namespace>(
&self,
name: &IdentifierRef<T>,
) -> Option<Object<'_>>
pub fn search_object<T: Namespace>( &self, name: &IdentifierRef<T>, ) -> Option<Object<'_>>
This assumes [crate::passes::Assumption::NamesUnique]
Sourcepub fn search_fieldset(&self, ref_val: &FieldsetRef) -> Option<&FieldSet>
pub fn search_fieldset(&self, ref_val: &FieldsetRef) -> Option<&FieldSet>
This assumes [crate::passes::Assumption::NamesUnique]
Sourcepub fn search_type(&self, ref_val: &TypeRef) -> Option<Object<'_>>
pub fn search_type(&self, ref_val: &TypeRef) -> Option<Object<'_>>
This assumes [crate::passes::Assumption::NamesUnique]
pub fn remove_object(&mut self, id: impl Into<ObjectId>)
Sourcepub fn object_parents(&self, object: impl Into<ObjectId>) -> &[ObjectId]
pub fn object_parents(&self, object: impl Into<ObjectId>) -> &[ObjectId]
Get the parent list for this object. The last parent is the most direct parent.
It is possible one of the parents has been removed.
Sourcepub fn object_config(&self, object: impl Into<ObjectId>) -> &DeviceConfig
pub fn object_config(&self, object: impl Into<ObjectId>) -> &DeviceConfig
Get the device config that applies to the given object
Trait Implementations§
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin for Manifest
impl UnwindSafe for Manifest
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.