Skip to main content

Container

Struct Container 

Source
pub struct Container {
    pub name: NameId,
    pub qualified_name: NameId,
    pub space_system: SpaceSystemId,
    pub is_abstract: bool,
    pub base: Option<ContainerId>,
    pub is_command: bool,
    pub command: Option<MetaCommandId>,
    pub restriction: Vec<MatchCriteria>,
    pub entries: Span,
    pub inheritors: Vec<ContainerId>,
    pub short_description: Option<NameId>,
    pub long_description: Option<NameId>,
}
Expand description

A <xtce:SequenceContainer>.

Fields§

§name: NameId

Container name as written.

§qualified_name: NameId

Fully qualified name.

§space_system: SpaceSystemId

The space system that owns this definition.

§is_abstract: bool

abstract="true": the container may not be the final match for a packet.

§base: Option<ContainerId>

The container this one extends, from <BaseContainer containerRef=..>.

§is_command: bool

Whether this container came from <CommandMetaData> rather than the telemetry half.

True for a MetaCommand’s own <CommandContainer> and for a shared one in a <CommandContainerSet>. It is what root selection needs: a telecommand is not a packet to decode by default, whoever owns it.

§command: Option<MetaCommandId>

The telecommand this container packs, when it is a <CommandContainer>.

None for a telemetry container — and also for a shared one in a <CommandContainerSet>, which is a telecommand’s packaging but belongs to no single command. Self::is_command is the question to ask about the half of the document a container came from; this one is the question about ownership.

§restriction: Vec<MatchCriteria>

Criteria under which this container specialises Self::base. All must hold.

§entries: Span

This container’s own entries, as a span of crate::XtceDb::entries.

Entries live in one shared arena so that decoding a container walks a contiguous slice rather than chasing a per-container Vec.

§inheritors: Vec<ContainerId>

Containers that name this one as their base, in document order.

Filled during resolution. Decoding descends this list, which is the direction the reference implementation walks and the direction packets are actually discriminated.

§short_description: Option<NameId>

shortDescription, if present.

§long_description: Option<NameId>

<LongDescription>, if present.

Trait Implementations§

Source§

impl Clone for Container

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Container

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.