pub struct ComponentColumnDescriptor {
pub store_datatype: DataType,
pub component_name: ComponentName,
pub entity_path: EntityPath,
pub archetype_name: Option<ArchetypeName>,
pub archetype_field_name: Option<ArchetypeFieldName>,
pub is_static: bool,
pub is_indicator: bool,
pub is_tombstone: bool,
pub is_semantically_empty: bool,
}
Expand description
Describes a data/component column, such as Position3D
, in a dataframe.
This is an [ArrowField
] that contains specific meta-data.
Fields§
§store_datatype: DataType
The Arrow datatype of the stored column.
This is the log-time datatype corresponding to how this data is encoded
in a chunk. Currently this will always be an [arrow::array::ListArray
], but as
we introduce mono-type optimization, this might be a native type instead.
component_name: ComponentName
Semantic name associated with this data.
This is fully implied by archetype_name
and archetype_field
, but
included for semantic convenience.
Example: rerun.components.Position3D
.
entity_path: EntityPath
The path of the entity.
If this column is part of a chunk batch, this is the same for all columns in the batch, and will also be set in the schema for the whole chunk.
If this is missing from the metadata, it will be set to /
.
archetype_name: Option<ArchetypeName>
Optional name of the Archetype
associated with this data.
None
if the data wasn’t logged through an archetype.
Example: rerun.archetypes.Points3D
.
archetype_field_name: Option<ArchetypeFieldName>
Optional name of the field within Archetype
associated with this data.
None
if the data wasn’t logged through an archetype.
Example: positions
.
is_static: bool
Whether this column represents static data.
is_indicator: bool
Whether this column represents an indicator component.
is_tombstone: bool
Whether this column represents a Clear
-related components.
is_semantically_empty: bool
Whether this column contains either no data or only contains null and/or empty values ([]
).
Implementations§
Source§impl ComponentColumnDescriptor
impl ComponentColumnDescriptor
Sourcepub fn sanity_check(&self)
pub fn sanity_check(&self)
Debug-only sanity check.
pub fn component_path(&self) -> ComponentPath
pub fn is_static(&self) -> bool
pub fn matches(&self, entity_path: &EntityPath, component_name: &str) -> bool
fn metadata(&self, batch_type: BatchType) -> ArrowFieldMetadata
pub fn returned_datatype(&self) -> ArrowDatatype
pub fn column_name(&self, batch_type: BatchType) -> String
pub fn to_arrow_field(&self, batch_type: BatchType) -> ArrowField
Source§impl ComponentColumnDescriptor
impl ComponentColumnDescriptor
Sourcepub fn from_arrow_field(
chunk_entity_path: Option<&EntityPath>,
field: &ArrowField,
) -> Self
pub fn from_arrow_field( chunk_entity_path: Option<&EntityPath>, field: &ArrowField, ) -> Self
chunk_entity_path
: if this column is part of a chunk batch,
what is its entity path (so we can set ComponentColumnDescriptor::entity_path
)?
Trait Implementations§
Source§impl Clone for ComponentColumnDescriptor
impl Clone for ComponentColumnDescriptor
Source§fn clone(&self) -> ComponentColumnDescriptor
fn clone(&self) -> ComponentColumnDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ComponentColumnDescriptor
impl Debug for ComponentColumnDescriptor
Source§impl Display for ComponentColumnDescriptor
impl Display for ComponentColumnDescriptor
Source§impl<'a> From<&'a ComponentColumnDescriptor> for ColumnDescriptorRef<'a>
impl<'a> From<&'a ComponentColumnDescriptor> for ColumnDescriptorRef<'a>
Source§fn from(desc: &'a ComponentColumnDescriptor) -> Self
fn from(desc: &'a ComponentColumnDescriptor) -> Self
Source§impl From<&ComponentColumnDescriptor> for ComponentDescriptor
impl From<&ComponentColumnDescriptor> for ComponentDescriptor
Source§fn from(descr: &ComponentColumnDescriptor) -> Self
fn from(descr: &ComponentColumnDescriptor) -> Self
Source§impl From<ComponentColumnDescriptor> for ComponentDescriptor
impl From<ComponentColumnDescriptor> for ComponentDescriptor
Source§fn from(descr: ComponentColumnDescriptor) -> Self
fn from(descr: ComponentColumnDescriptor) -> Self
Source§impl Hash for ComponentColumnDescriptor
impl Hash for ComponentColumnDescriptor
Source§impl Ord for ComponentColumnDescriptor
impl Ord for ComponentColumnDescriptor
Source§impl PartialOrd for ComponentColumnDescriptor
impl PartialOrd for ComponentColumnDescriptor
impl Eq for ComponentColumnDescriptor
impl StructuralPartialEq for ComponentColumnDescriptor
Auto Trait Implementations§
impl Freeze for ComponentColumnDescriptor
impl RefUnwindSafe for ComponentColumnDescriptor
impl Send for ComponentColumnDescriptor
impl Sync for ComponentColumnDescriptor
impl Unpin for ComponentColumnDescriptor
impl UnwindSafe for ComponentColumnDescriptor
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>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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 more