Trait re_sdk::Loggable

source ·
pub trait Loggable: Sized + 'static + Send + Sync + Clone + SizeBytes {
    // Required methods
    fn arrow_datatype() -> DataType;
    fn to_arrow_opt<'a>(
        data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
    ) -> Result<Arc<dyn Array>, SerializationError>
       where Self: 'a;

    // Provided methods
    fn arrow_empty() -> Arc<dyn Array> { ... }
    fn to_arrow<'a>(
        data: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>,
    ) -> Result<Arc<dyn Array>, SerializationError>
       where Self: 'a { ... }
    fn from_arrow(data: &dyn Array) -> Result<Vec<Self>, DeserializationError> { ... }
    fn from_arrow_opt(
        data: &dyn Array,
    ) -> Result<Vec<Option<Self>>, DeserializationError> { ... }
}
Expand description

A Loggable represents a single instance in an array of loggable data.

Internally, Arrow, and by extension Rerun, only deal with arrays of data. We refer to individual entries in these arrays as instances.

A Loggable has no semantics (such as a name, for example): it’s just data. If you want to encode semantics, then you’re looking for a Component, which extends Loggable.

Implementing the Loggable trait automatically derives the LoggableBatch implementation, which makes it possible to work with lists’ worth of data in a generic fashion.

Required Methods§

source

fn arrow_datatype() -> DataType

The underlying arrow::datatypes::DataType, excluding datatype extensions.

source

fn to_arrow_opt<'a>( data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>, ) -> Result<Arc<dyn Array>, SerializationError>
where Self: 'a,

Given an iterator of options of owned or reference values to the current Loggable, serializes them into an Arrow array.

When using Rerun’s builtin components & datatypes, this can only fail if the data exceeds the maximum number of entries in an Arrow array (2^31 for standard arrays, 2^63 for large arrays).

Provided Methods§

source

fn arrow_empty() -> Arc<dyn Array>

source

fn to_arrow<'a>( data: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>, ) -> Result<Arc<dyn Array>, SerializationError>
where Self: 'a,

Given an iterator of owned or reference values to the current Loggable, serializes them into an Arrow array.

When using Rerun’s builtin components & datatypes, this can only fail if the data exceeds the maximum number of entries in an Arrow array (2^31 for standard arrays, 2^63 for large arrays).

source

fn from_arrow(data: &dyn Array) -> Result<Vec<Self>, DeserializationError>

Given an Arrow array, deserializes it into a collection of Loggables.

source

fn from_arrow_opt( data: &dyn Array, ) -> Result<Vec<Option<Self>>, DeserializationError>

Given an Arrow array, deserializes it into a collection of optional Loggables.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Loggable for BackgroundKind

source§

impl Loggable for ContainerKind

source§

impl Loggable for Corner2D

source§

impl Loggable for MapProvider

source§

impl Loggable for PanelState

source§

impl Loggable for ViewFit

source§

impl Loggable for AggregationPolicy

source§

impl Loggable for Colormap

source§

impl Loggable for FillMode

source§

impl Loggable for GraphType

source§

impl Loggable for MagnificationFilter

source§

impl Loggable for MarkerShape

source§

impl Loggable for TransformRelation

source§

impl Loggable for ChannelDatatype

source§

impl Loggable for ColorModel

source§

impl Loggable for PixelFormat

source§

impl Loggable for TensorBuffer

source§

impl Loggable for AffixFuzzer3

source§

impl Loggable for AffixFuzzer4

source§

impl Loggable for EnumTest

source§

impl Loggable for ValuedEnum

source§

impl Loggable for ActiveTab

source§

impl Loggable for ApplyLatestAt

source§

impl Loggable for AutoLayout

source§

impl Loggable for AutoViews

source§

impl Loggable for ColumnShare

source§

impl Loggable for ComponentColumnSelector

source§

impl Loggable for Enabled

source§

impl Loggable for FilterByRange

source§

impl Loggable for FilterIsNotNull

source§

impl Loggable for ForceDistance

source§

impl Loggable for ForceIterations

source§

impl Loggable for ForceStrength

source§

impl Loggable for GridColumns

source§

impl Loggable for GridSpacing

source§

impl Loggable for IncludedContent

source§

impl Loggable for Interactive

source§

impl Loggable for LockRangeDuringZoom

source§

impl Loggable for NearClipPlane

source§

impl Loggable for QueryExpression

source§

impl Loggable for RootContainer

source§

impl Loggable for RowShare

source§

impl Loggable for SelectedColumns

source§

impl Loggable for TensorDimensionIndexSlider

source§

impl Loggable for TimelineName

source§

impl Loggable for ViewClass

source§

impl Loggable for ViewMaximized

source§

impl Loggable for ViewOrigin

source§

impl Loggable for ViewerRecommendationHash

source§

impl Loggable for Visible

source§

impl Loggable for VisibleTimeRange

source§

impl Loggable for VisualBounds2D

source§

impl Loggable for VisualizerOverrides

source§

impl Loggable for ZoomLevel

source§

impl Loggable for ComponentColumnSelector

source§

impl Loggable for FilterByRange

source§

impl Loggable for FilterIsNotNull

source§

impl Loggable for SelectedColumns

source§

impl Loggable for TensorDimensionIndexSlider

source§

impl Loggable for Utf8List

source§

impl Loggable for AlbedoFactor

source§

impl Loggable for AnnotationContext

source§

impl Loggable for AxisLength

source§

impl Loggable for Blob

source§

fn arrow_datatype() -> DataType

source§

fn to_arrow_opt<'a>( data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Blob>>>>, ) -> Result<Arc<dyn Array>, SerializationError>
where Blob: Clone + 'a,

source§

fn from_arrow_opt( arrow_data: &dyn Array, ) -> Result<Vec<Option<Blob>>, DeserializationError>
where Blob: Sized,

source§

impl Loggable for ClassId

source§

impl Loggable for Color

source§

impl Loggable for DepthMeter

source§

impl Loggable for DrawOrder

source§

impl Loggable for EntityPath

source§

impl Loggable for FillRatio

source§

impl Loggable for GammaCorrection

source§

impl Loggable for GeoLineString

source§

impl Loggable for GraphEdge

source§

impl Loggable for GraphNode

source§

impl Loggable for HalfSize2D

source§

impl Loggable for HalfSize3D

source§

impl Loggable for ImageBuffer

source§

impl Loggable for ImageFormat

source§

impl Loggable for ImagePlaneDistance

source§

impl Loggable for KeypointId

source§

impl Loggable for LatLon

source§

impl Loggable for Length

source§

impl Loggable for LineStrip2D

source§

impl Loggable for LineStrip3D

source§

impl Loggable for MarkerSize

source§

impl Loggable for MediaType

source§

impl Loggable for Name

source§

fn arrow_datatype() -> DataType

source§

fn to_arrow_opt<'a>( data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Name>>>>, ) -> Result<Arc<dyn Array>, SerializationError>
where Name: Clone + 'a,

source§

fn from_arrow_opt( arrow_data: &dyn Array, ) -> Result<Vec<Option<Name>>, DeserializationError>
where Name: Sized,

source§

impl Loggable for Opacity

source§

impl Loggable for PinholeProjection

source§

impl Loggable for Plane3D

source§

impl Loggable for PoseRotationAxisAngle

source§

impl Loggable for PoseRotationQuat

source§

impl Loggable for PoseScale3D

source§

impl Loggable for PoseTransformMat3x3

source§

impl Loggable for PoseTranslation3D

source§

impl Loggable for Position2D

source§

impl Loggable for Position3D

source§

impl Loggable for Radius

source§

impl Loggable for Range1D

source§

impl Loggable for RecordingUri

source§

impl Loggable for Resolution

source§

impl Loggable for RotationAxisAngle

source§

impl Loggable for RotationQuat

source§

impl Loggable for Scalar

source§

impl Loggable for Scale3D

source§

impl Loggable for ShowLabels

source§

impl Loggable for StrokeWidth

source§

impl Loggable for TensorData

source§

impl Loggable for TensorDimensionIndexSelection

source§

impl Loggable for TensorHeightDimension

source§

impl Loggable for TensorWidthDimension

source§

impl Loggable for Texcoord2D

source§

impl Loggable for Text

source§

fn arrow_datatype() -> DataType

source§

fn to_arrow_opt<'a>( data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Text>>>>, ) -> Result<Arc<dyn Array>, SerializationError>
where Text: Clone + 'a,

source§

fn from_arrow_opt( arrow_data: &dyn Array, ) -> Result<Vec<Option<Text>>, DeserializationError>
where Text: Sized,

source§

impl Loggable for TextLogLevel

source§

impl Loggable for TransformMat3x3

source§

impl Loggable for Translation3D

source§

impl Loggable for TriangleIndices

source§

impl Loggable for ValueRange

source§

impl Loggable for Vector2D

source§

impl Loggable for Vector3D

source§

impl Loggable for VideoTimestamp

source§

impl Loggable for ViewCoordinates

source§

impl Loggable for Angle

source§

impl Loggable for AnnotationInfo

source§

impl Loggable for Blob

source§

fn arrow_datatype() -> DataType

source§

fn to_arrow_opt<'a>( data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Blob>>>>, ) -> Result<Arc<dyn Array>, SerializationError>
where Blob: Clone + 'a,

source§

fn from_arrow_opt( arrow_data: &dyn Array, ) -> Result<Vec<Option<Blob>>, DeserializationError>
where Blob: Sized,

source§

impl Loggable for ClassDescription

source§

impl Loggable for ClassDescriptionMapElem

source§

impl Loggable for ClassId

source§

impl Loggable for DVec2D

source§

impl Loggable for ImageFormat

source§

impl Loggable for KeypointId

source§

impl Loggable for KeypointPair

source§

impl Loggable for Mat3x3

source§

impl Loggable for Mat4x4

source§

impl Loggable for Plane3D

source§

impl Loggable for Quaternion

source§

impl Loggable for Range1D

source§

impl Loggable for Range2D

source§

impl Loggable for Rgba32

source§

impl Loggable for RotationAxisAngle

source§

impl Loggable for TensorData

source§

impl Loggable for TensorDimensionIndexSelection

source§

impl Loggable for TensorDimensionSelection

source§

impl Loggable for Utf8Pair

source§

impl Loggable for Uuid

source§

impl Loggable for UVec2D

source§

impl Loggable for UVec3D

source§

impl Loggable for UVec4D

source§

impl Loggable for Vec2D

source§

impl Loggable for Vec3D

source§

impl Loggable for Vec4D

source§

impl Loggable for VideoTimestamp

source§

impl Loggable for ViewCoordinates

source§

impl Loggable for AffixFuzzer1

source§

impl Loggable for AffixFuzzer2

source§

impl Loggable for AffixFuzzer3

source§

impl Loggable for AffixFuzzer4

source§

impl Loggable for AffixFuzzer5

source§

impl Loggable for AffixFuzzer6

source§

impl Loggable for AffixFuzzer7

source§

impl Loggable for AffixFuzzer8

source§

impl Loggable for AffixFuzzer9

source§

impl Loggable for AffixFuzzer10

source§

impl Loggable for AffixFuzzer11

source§

impl Loggable for AffixFuzzer12

source§

impl Loggable for AffixFuzzer13

source§

impl Loggable for AffixFuzzer14

source§

impl Loggable for AffixFuzzer15

source§

impl Loggable for AffixFuzzer16

source§

impl Loggable for AffixFuzzer17

source§

impl Loggable for AffixFuzzer18

source§

impl Loggable for AffixFuzzer19

source§

impl Loggable for AffixFuzzer20

source§

impl Loggable for AffixFuzzer21

source§

impl Loggable for AffixFuzzer22

source§

impl Loggable for AffixFuzzer23

source§

impl Loggable for AffixFuzzer1

source§

impl Loggable for AffixFuzzer2

source§

impl Loggable for AffixFuzzer5

source§

impl Loggable for AffixFuzzer20

source§

impl Loggable for AffixFuzzer21

source§

impl Loggable for AffixFuzzer22

source§

impl Loggable for FlattenedScalar

source§

impl Loggable for MultiEnum

source§

impl Loggable for PrimitiveComponent

source§

impl Loggable for StringComponent

Implementors§