Trait rerun::external::re_types_core::SizeBytes

source ·
pub trait SizeBytes {
    // Required method
    fn heap_size_bytes(&self) -> u64;

    // Provided methods
    fn total_size_bytes(&self) -> u64 { ... }
    fn stack_size_bytes(&self) -> u64 { ... }
    fn is_pod() -> bool { ... }
}
Expand description

Approximations of stack and heap size for both internal and external types.

Motly used for statistics and triggering events such as garbage collection.

Required Methods§

source

fn heap_size_bytes(&self) -> u64

Returns the total size of self on the heap, in bytes.

Provided Methods§

source

fn total_size_bytes(&self) -> u64

Returns the total size of self in bytes, accounting for both stack and heap space.

source

fn stack_size_bytes(&self) -> u64

Returns the total size of self on the stack, in bytes.

Defaults to std::mem::size_of_val(self).

source

fn is_pod() -> bool

Is Self just plain old data?

If true, this will make most blanket implementations of SizeBytes much faster (e.g. Vec<T>).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SizeBytes for bool

source§

impl SizeBytes for f32

source§

impl SizeBytes for f64

source§

impl SizeBytes for i8

source§

impl SizeBytes for i16

source§

impl SizeBytes for i32

source§

impl SizeBytes for i64

source§

impl SizeBytes for i128

source§

impl SizeBytes for u8

source§

impl SizeBytes for u16

source§

impl SizeBytes for u32

source§

impl SizeBytes for u64

source§

impl SizeBytes for u128

source§

impl SizeBytes for String

source§

fn heap_size_bytes(&self) -> u64

Does not take capacity into account.

source§

impl<K, V> SizeBytes for BTreeMap<K, V>
where K: SizeBytes, V: SizeBytes,

source§

impl<K, V, S> SizeBytes for HashMap<K, V, S>
where K: SizeBytes, V: SizeBytes,

source§

impl<T> SizeBytes for Option<T>
where T: SizeBytes,

source§

impl<T> SizeBytes for VecDeque<T>
where T: SizeBytes,

source§

fn heap_size_bytes(&self) -> u64

Does not take capacity into account.

source§

impl<T> SizeBytes for Arc<T>
where T: SizeBytes,

source§

impl<T> SizeBytes for Vec<T>
where T: SizeBytes,

source§

fn heap_size_bytes(&self) -> u64

Does not take capacity into account.

source§

impl<T> SizeBytes for FlatVecDeque<T>
where T: SizeBytes,

source§

impl<T, U> SizeBytes for (T, U)
where T: SizeBytes, U: SizeBytes,

source§

impl<T, U, V> SizeBytes for (T, U, V)
where T: SizeBytes, U: SizeBytes, V: SizeBytes,

source§

impl<T, U, V, W> SizeBytes for (T, U, V, W)
where T: SizeBytes, U: SizeBytes, V: SizeBytes, W: SizeBytes,

source§

impl<T, const N: usize> SizeBytes for [T; N]
where T: SizeBytes,

source§

impl<T, const N: usize> SizeBytes for SmallVec<[T; N]>
where T: SizeBytes,

source§

fn heap_size_bytes(&self) -> u64

Does not take capacity into account.

Implementors§

source§

impl SizeBytes for MarkerShape

source§

impl SizeBytes for rerun::datatypes::Transform3D

source§

impl SizeBytes for Angle

source§

impl SizeBytes for rerun::Rotation3D

source§

impl SizeBytes for Scale3D

source§

impl SizeBytes for TensorBuffer

source§

impl SizeBytes for DataType

source§

impl SizeBytes for VisibleTimeRangeBoundaryKind

source§

impl SizeBytes for Background3DKind

source§

impl SizeBytes for ContainerKind

source§

impl SizeBytes for Corner2D

source§

impl SizeBytes for rerun::components::AnnotationContext

source§

impl SizeBytes for Blob

source§

impl SizeBytes for rerun::components::ClassId

source§

impl SizeBytes for ClearIsRecursive

source§

impl SizeBytes for DepthMeter

source§

impl SizeBytes for rerun::components::DisconnectedSpace

source§

impl SizeBytes for DrawOrder

source§

impl SizeBytes for rerun::components::KeypointId

source§

impl SizeBytes for MarkerSize

source§

impl SizeBytes for Name

source§

impl SizeBytes for PinholeProjection

source§

impl SizeBytes for Range1D

source§

impl SizeBytes for Resolution

source§

impl SizeBytes for rerun::components::Rotation3D

source§

impl SizeBytes for rerun::components::Scalar

source§

impl SizeBytes for ScalarScattering

source§

impl SizeBytes for StrokeWidth

source§

impl SizeBytes for rerun::components::TensorData

source§

impl SizeBytes for Texcoord2D

source§

impl SizeBytes for rerun::components::Transform3D

source§

impl SizeBytes for rerun::components::ViewCoordinates

source§

impl SizeBytes for VisualizerOverrides

source§

impl SizeBytes for Bool

source§

impl SizeBytes for ClassDescriptionMapElem

source§

impl SizeBytes for rerun::datatypes::ClassId

source§

impl SizeBytes for rerun::datatypes::EntityPath

source§

impl SizeBytes for rerun::datatypes::KeypointId

source§

impl SizeBytes for Mat4x4

source§

impl SizeBytes for rerun::datatypes::Material

source§

impl SizeBytes for rerun::datatypes::MeshProperties

source§

impl SizeBytes for rerun::datatypes::TimeInt

source§

impl SizeBytes for UInt32

source§

impl SizeBytes for UInt64

source§

impl SizeBytes for UVec2D

source§

impl SizeBytes for UVec3D

source§

impl SizeBytes for UVec4D

source§

impl SizeBytes for Utf8

source§

impl SizeBytes for Uuid

source§

impl SizeBytes for DataCell

source§

impl SizeBytes for DataRow

source§

impl SizeBytes for DataTable

source§

impl SizeBytes for RowId

source§

impl SizeBytes for TableId

source§

impl SizeBytes for rerun::AnnotationContext

source§

impl SizeBytes for AnnotationInfo

source§

impl SizeBytes for Arrows2D

source§

impl SizeBytes for Arrows3D

source§

impl SizeBytes for Asset3D

source§

impl SizeBytes for BarChart

source§

impl SizeBytes for Boxes2D

source§

impl SizeBytes for Boxes3D

source§

impl SizeBytes for ClassDescription

source§

impl SizeBytes for Clear

source§

impl SizeBytes for Color

source§

impl SizeBytes for ComponentName

source§

impl SizeBytes for DataStore

source§

impl SizeBytes for DatatypeName

source§

impl SizeBytes for DepthImage

source§

impl SizeBytes for rerun::DisconnectedSpace

source§

impl SizeBytes for rerun::EntityPath

source§

impl SizeBytes for Float32

source§

impl SizeBytes for HalfSizes2D

source§

impl SizeBytes for HalfSizes3D

source§

impl SizeBytes for Image

source§

impl SizeBytes for InstanceKey

source§

impl SizeBytes for KeypointPair

source§

impl SizeBytes for LineStrip2D

source§

impl SizeBytes for LineStrip3D

source§

impl SizeBytes for LineStrips2D

source§

impl SizeBytes for LineStrips3D

source§

impl SizeBytes for Mat3x3

source§

impl SizeBytes for rerun::Material

source§

impl SizeBytes for MediaType

source§

impl SizeBytes for Mesh3D

source§

impl SizeBytes for rerun::MeshProperties

source§

impl SizeBytes for OutOfTreeTransform3D

source§

impl SizeBytes for Pinhole

source§

impl SizeBytes for Points2D

source§

impl SizeBytes for Points3D

source§

impl SizeBytes for Position2D

source§

impl SizeBytes for Position3D

source§

impl SizeBytes for Quaternion

source§

impl SizeBytes for Radius

source§

impl SizeBytes for Rgba32

source§

impl SizeBytes for RotationAxisAngle

source§

impl SizeBytes for rerun::Scalar

source§

impl SizeBytes for SegmentationImage

source§

impl SizeBytes for SeriesLine

source§

impl SizeBytes for SeriesPoint

source§

impl SizeBytes for Tensor

source§

impl SizeBytes for rerun::TensorData

source§

impl SizeBytes for TensorDimension

source§

impl SizeBytes for Text

source§

impl SizeBytes for TextDocument

source§

impl SizeBytes for TextLog

source§

impl SizeBytes for TextLogLevel

source§

impl SizeBytes for TimePoint

source§

impl SizeBytes for Timeline

source§

impl SizeBytes for rerun::Transform3D

source§

impl SizeBytes for TranslationAndMat3x3

source§

impl SizeBytes for TranslationRotationScale3D

source§

impl SizeBytes for Vec2D

source§

impl SizeBytes for Vec3D

source§

impl SizeBytes for Vec4D

source§

impl SizeBytes for Vector2D

source§

impl SizeBytes for Vector3D

source§

impl SizeBytes for rerun::ViewCoordinates

source§

impl SizeBytes for rerun::time::TimeInt

source§

impl SizeBytes for Field

source§

impl SizeBytes for f16

source§

impl SizeBytes for EntityDb

source§

impl SizeBytes for EntityPropertiesComponent

source§

impl SizeBytes for MyColor

source§

impl SizeBytes for MyLabel

source§

impl SizeBytes for MyPoint

source§

impl SizeBytes for Hash64

source§

impl SizeBytes for DataCellColumn

source§

impl SizeBytes for DataCellRow

source§

impl SizeBytes for EntityPathHash

source§

impl SizeBytes for NumInstances

source§

impl SizeBytes for TimeRange

source§

impl SizeBytes for Tuid

source§

impl SizeBytes for Background3D

source§

impl SizeBytes for PlotLegend

source§

impl SizeBytes for ScalarAxis

source§

impl SizeBytes for SpaceViewBlueprint

source§

impl SizeBytes for SpaceViewContents

source§

impl SizeBytes for rerun::external::re_types::blueprint::datatypes::VisibleTimeRange

source§

impl SizeBytes for VisibleTimeRangeBoundary

source§

impl SizeBytes for ContainerBlueprint

source§

impl SizeBytes for PanelBlueprint

source§

impl SizeBytes for ViewportBlueprint

source§

impl SizeBytes for ActiveTab

source§

impl SizeBytes for AutoLayout

source§

impl SizeBytes for AutoSpaceViews

source§

impl SizeBytes for ColumnShare

source§

impl SizeBytes for GridColumns

source§

impl SizeBytes for IncludedContent

source§

impl SizeBytes for IncludedSpaceView

source§

impl SizeBytes for LockRangeDuringZoom

source§

impl SizeBytes for PanelExpanded

source§

impl SizeBytes for QueryExpression

source§

impl SizeBytes for RootContainer

source§

impl SizeBytes for RowShare

source§

impl SizeBytes for SpaceViewClass

source§

impl SizeBytes for SpaceViewMaximized

source§

impl SizeBytes for SpaceViewOrigin

source§

impl SizeBytes for ViewerRecommendationHash

source§

impl SizeBytes for Visible

source§

impl SizeBytes for rerun::external::re_viewport::blueprint::components::VisibleTimeRange

source§

impl SizeBytes for ArrowString

source§

impl SizeBytes for dyn Array

source§

impl<T> SizeBytes for ArrowBuffer<T>
where T: SizeBytes,