pub struct ContainerBlueprint {
pub container_kind: ContainerKind,
pub display_name: Option<Name>,
pub contents: Option<Vec<IncludedContent>>,
pub col_shares: Option<Vec<ColumnShare>>,
pub row_shares: Option<Vec<RowShare>>,
pub active_tab: Option<ActiveTab>,
pub visible: Option<Visible>,
pub grid_columns: Option<GridColumns>,
}Expand description
Archetype: The top-level description of the Viewport.
Fields§
§container_kind: ContainerKindThe class of the view.
display_name: Option<Name>The name of the container.
contents: Option<Vec<IncludedContent>>ContainerIdss or SpaceViewIds that are children of this container.
The layout shares of each column in the container.
For Horizontal containers, the length of this list should always match the number of contents.
Ignored for Vertical containers.
The layout shares of each row of the container.
For Vertical containers, the length of this list should always match the number of contents.
Ignored for Horizontal containers.
active_tab: Option<ActiveTab>Which tab is active.
Only applies to Tabs containers.
visible: Option<Visible>Whether this container is visible.
Defaults to true if not specified.
grid_columns: Option<GridColumns>How many columns this grid should have.
If unset, the grid layout will be auto.
Ignored for Horizontal/Vertical containers.
Implementations§
source§impl ContainerBlueprint
impl ContainerBlueprint
sourcepub const NUM_COMPONENTS: usize = 9usize
pub const NUM_COMPONENTS: usize = 9usize
The total number of components in the archetype: 1 required, 1 recommended, 7 optional
source§impl ContainerBlueprint
impl ContainerBlueprint
sourcepub fn new(container_kind: impl Into<ContainerKind>) -> Self
pub fn new(container_kind: impl Into<ContainerKind>) -> Self
Create a new ContainerBlueprint.
sourcepub fn with_display_name(self, display_name: impl Into<Name>) -> Self
pub fn with_display_name(self, display_name: impl Into<Name>) -> Self
The name of the container.
sourcepub fn with_contents(
self,
contents: impl IntoIterator<Item = impl Into<IncludedContent>>
) -> Self
pub fn with_contents( self, contents: impl IntoIterator<Item = impl Into<IncludedContent>> ) -> Self
ContainerIdss or SpaceViewIds that are children of this container.
The layout shares of each column in the container.
For Horizontal containers, the length of this list should always match the number of contents.
Ignored for Vertical containers.
The layout shares of each row of the container.
For Vertical containers, the length of this list should always match the number of contents.
Ignored for Horizontal containers.
sourcepub fn with_active_tab(self, active_tab: impl Into<ActiveTab>) -> Self
pub fn with_active_tab(self, active_tab: impl Into<ActiveTab>) -> Self
Which tab is active.
Only applies to Tabs containers.
sourcepub fn with_visible(self, visible: impl Into<Visible>) -> Self
pub fn with_visible(self, visible: impl Into<Visible>) -> Self
Whether this container is visible.
Defaults to true if not specified.
sourcepub fn with_grid_columns(self, grid_columns: impl Into<GridColumns>) -> Self
pub fn with_grid_columns(self, grid_columns: impl Into<GridColumns>) -> Self
How many columns this grid should have.
If unset, the grid layout will be auto.
Ignored for Horizontal/Vertical containers.
Trait Implementations§
source§impl Archetype for ContainerBlueprint
impl Archetype for ContainerBlueprint
§type Indicator = GenericIndicatorComponent<ContainerBlueprint>
type Indicator = GenericIndicatorComponent<ContainerBlueprint>
source§fn name() -> ArchetypeName
fn name() -> ArchetypeName
rerun.archetypes.Points2D.source§fn indicator() -> MaybeOwnedComponentBatch<'static>
fn indicator() -> MaybeOwnedComponentBatch<'static>
source§fn required_components() -> Cow<'static, [ComponentName]>
fn required_components() -> Cow<'static, [ComponentName]>
source§fn recommended_components() -> Cow<'static, [ComponentName]>
fn recommended_components() -> Cow<'static, [ComponentName]>
source§fn optional_components() -> Cow<'static, [ComponentName]>
fn optional_components() -> Cow<'static, [ComponentName]>
source§fn all_components() -> Cow<'static, [ComponentName]>
fn all_components() -> Cow<'static, [ComponentName]>
source§fn from_arrow_components(
arrow_data: impl IntoIterator<Item = (ComponentName, Box<dyn Array>)>
) -> DeserializationResult<Self>
fn from_arrow_components( arrow_data: impl IntoIterator<Item = (ComponentName, Box<dyn Array>)> ) -> DeserializationResult<Self>
ComponentNames, deserializes them
into this archetype. Read moresource§fn from_arrow(
data: impl IntoIterator<Item = (Field, Box<dyn Array>)>
) -> Result<Self, DeserializationError>where
Self: Sized,
fn from_arrow(
data: impl IntoIterator<Item = (Field, Box<dyn Array>)>
) -> Result<Self, DeserializationError>where
Self: Sized,
source§impl AsComponents for ContainerBlueprint
impl AsComponents for ContainerBlueprint
source§fn as_component_batches(&self) -> Vec<MaybeOwnedComponentBatch<'_>>
fn as_component_batches(&self) -> Vec<MaybeOwnedComponentBatch<'_>>
ComponentBatchs. Read moresource§impl Clone for ContainerBlueprint
impl Clone for ContainerBlueprint
source§fn clone(&self) -> ContainerBlueprint
fn clone(&self) -> ContainerBlueprint
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ContainerBlueprint
impl Debug for ContainerBlueprint
source§impl SizeBytes for ContainerBlueprint
impl SizeBytes for ContainerBlueprint
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
self on the heap, in bytes.source§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
self in bytes, accounting for both stack and heap space.source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
self on the stack, in bytes. Read moreAuto Trait Implementations§
impl Freeze for ContainerBlueprint
impl RefUnwindSafe for ContainerBlueprint
impl Send for ContainerBlueprint
impl Sync for ContainerBlueprint
impl Unpin for ContainerBlueprint
impl UnwindSafe for ContainerBlueprint
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
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>
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>
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