Struct re_types::blueprint::archetypes::ContainerBlueprint
source · 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 description of a container.
Fields§
§container_kind: ContainerKind
The class of the view.
display_name: Option<Name>
The name of the container.
contents: Option<Vec<IncludedContent>>
ContainerId
s or ViewId
s that are children of this container.
The layout shares of each column in the container.
For components::ContainerKind::Horizontal
containers, the length of this list should always match the number of contents.
Ignored for components::ContainerKind::Vertical
containers.
The layout shares of each row of the container.
For components::ContainerKind::Vertical
containers, the length of this list should always match the number of contents.
Ignored for components::ContainerKind::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 components::ContainerKind::Horizontal
/components::ContainerKind::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
ContainerId
s or ViewId
s that are children of this container.
The layout shares of each column in the container.
For components::ContainerKind::Horizontal
containers, the length of this list should always match the number of contents.
Ignored for components::ContainerKind::Vertical
containers.
The layout shares of each row of the container.
For components::ContainerKind::Vertical
containers, the length of this list should always match the number of contents.
Ignored for components::ContainerKind::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 components::ContainerKind::Horizontal
/components::ContainerKind::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 display_name() -> &'static str
fn display_name() -> &'static str
source§fn indicator() -> ComponentBatchCowWithDescriptor<'static>
fn indicator() -> ComponentBatchCowWithDescriptor<'static>
source§fn required_components() -> Cow<'static, [ComponentDescriptor]>
fn required_components() -> Cow<'static, [ComponentDescriptor]>
source§fn recommended_components() -> Cow<'static, [ComponentDescriptor]>
fn recommended_components() -> Cow<'static, [ComponentDescriptor]>
source§fn optional_components() -> Cow<'static, [ComponentDescriptor]>
fn optional_components() -> Cow<'static, [ComponentDescriptor]>
source§fn all_components() -> Cow<'static, [ComponentDescriptor]>
fn all_components() -> Cow<'static, [ComponentDescriptor]>
source§fn from_arrow2_components(
arrow_data: impl IntoIterator<Item = (ComponentName, Box<dyn Array>)>,
) -> DeserializationResult<Self>
fn from_arrow2_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, Arc<dyn Array>)>,
) -> Result<Self, DeserializationError>where
Self: Sized,
fn from_arrow(
data: impl IntoIterator<Item = (Field, Arc<dyn Array>)>,
) -> Result<Self, DeserializationError>where
Self: Sized,
source§fn from_arrow2(
data: impl IntoIterator<Item = (Field, Box<dyn Array>)>,
) -> Result<Self, DeserializationError>where
Self: Sized,
fn from_arrow2(
data: impl IntoIterator<Item = (Field, Box<dyn Array>)>,
) -> Result<Self, DeserializationError>where
Self: Sized,
source§fn from_arrow_components(
data: impl IntoIterator<Item = (ComponentName, Arc<dyn Array>)>,
) -> Result<Self, DeserializationError>where
Self: Sized,
fn from_arrow_components(
data: impl IntoIterator<Item = (ComponentName, Arc<dyn Array>)>,
) -> Result<Self, DeserializationError>where
Self: Sized,
ComponentNames
, deserializes them
into this archetype. Read moresource§impl AsComponents for ContainerBlueprint
impl AsComponents for ContainerBlueprint
source§fn as_component_batches(&self) -> Vec<ComponentBatchCowWithDescriptor<'_>>
fn as_component_batches(&self) -> Vec<ComponentBatchCowWithDescriptor<'_>>
ComponentBatch
s. 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 moreimpl ArchetypeReflectionMarker for ContainerBlueprint
Auto 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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request