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§
sourcefn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
Returns the total size of self
on the heap, in bytes.
Provided Methods§
sourcefn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
Returns the total size of self
in bytes, accounting for both stack and heap space.
sourcefn stack_size_bytes(&self) -> u64
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)
.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl SizeBytes for BackgroundKind
impl SizeBytes for BackgroundKind
source§impl SizeBytes for MapProvider
impl SizeBytes for MapProvider
source§impl SizeBytes for PanelState
impl SizeBytes for PanelState
source§impl SizeBytes for AggregationPolicy
impl SizeBytes for AggregationPolicy
source§impl SizeBytes for MagnificationFilter
impl SizeBytes for MagnificationFilter
source§impl SizeBytes for MarkerShape
impl SizeBytes for MarkerShape
source§impl SizeBytes for TransformRelation
impl SizeBytes for TransformRelation
source§impl SizeBytes for ChannelDatatype
impl SizeBytes for ChannelDatatype
source§impl SizeBytes for ColorModel
impl SizeBytes for ColorModel
source§impl SizeBytes for PixelFormat
impl SizeBytes for PixelFormat
source§impl SizeBytes for TensorBuffer
impl SizeBytes for TensorBuffer
source§impl SizeBytes for AffixFuzzer3
impl SizeBytes for AffixFuzzer3
source§impl SizeBytes for AffixFuzzer4
impl SizeBytes for AffixFuzzer4
source§impl SizeBytes for ValuedEnum
impl SizeBytes for ValuedEnum
fn heap_size_bytes(&self) -> u64
source§impl SizeBytes for EntityPathHash
impl SizeBytes for EntityPathHash
fn heap_size_bytes(&self) -> u64
source§impl SizeBytes for ResolvedTimeRange
impl SizeBytes for ResolvedTimeRange
fn heap_size_bytes(&self) -> u64
source§impl SizeBytes for AnnotationContext
impl SizeBytes for AnnotationContext
source§impl SizeBytes for AssetVideo
impl SizeBytes for AssetVideo
source§impl SizeBytes for Capsules3D
impl SizeBytes for Capsules3D
source§impl SizeBytes for DepthImage
impl SizeBytes for DepthImage
source§impl SizeBytes for DisconnectedSpace
impl SizeBytes for DisconnectedSpace
source§impl SizeBytes for Ellipsoids3D
impl SizeBytes for Ellipsoids3D
source§impl SizeBytes for EncodedImage
impl SizeBytes for EncodedImage
source§impl SizeBytes for GeoLineStrings
impl SizeBytes for GeoLineStrings
source§impl SizeBytes for InstancePoses3D
impl SizeBytes for InstancePoses3D
source§impl SizeBytes for LineStrips2D
impl SizeBytes for LineStrips2D
source§impl SizeBytes for LineStrips3D
impl SizeBytes for LineStrips3D
source§impl SizeBytes for SegmentationImage
impl SizeBytes for SegmentationImage
source§impl SizeBytes for SeriesLine
impl SizeBytes for SeriesLine
source§impl SizeBytes for SeriesPoint
impl SizeBytes for SeriesPoint
source§impl SizeBytes for TextDocument
impl SizeBytes for TextDocument
source§impl SizeBytes for Transform3D
impl SizeBytes for Transform3D
source§impl SizeBytes for VideoFrameReference
impl SizeBytes for VideoFrameReference
source§impl SizeBytes for ViewCoordinates
impl SizeBytes for ViewCoordinates
source§impl SizeBytes for Background
impl SizeBytes for Background
source§impl SizeBytes for DataframeQuery
impl SizeBytes for DataframeQuery
source§impl SizeBytes for MapBackground
impl SizeBytes for MapBackground
source§impl SizeBytes for PlotLegend
impl SizeBytes for PlotLegend
source§impl SizeBytes for ScalarAxis
impl SizeBytes for ScalarAxis
source§impl SizeBytes for SpaceViewBlueprint
impl SizeBytes for SpaceViewBlueprint
source§impl SizeBytes for SpaceViewContents
impl SizeBytes for SpaceViewContents
source§impl SizeBytes for TensorScalarMapping
impl SizeBytes for TensorScalarMapping
source§impl SizeBytes for TensorSliceSelection
impl SizeBytes for TensorSliceSelection
source§impl SizeBytes for TensorViewFit
impl SizeBytes for TensorViewFit
source§impl SizeBytes for VisibleTimeRanges
impl SizeBytes for VisibleTimeRanges
source§impl SizeBytes for VisualBounds2D
impl SizeBytes for VisualBounds2D
source§impl SizeBytes for ApplyLatestAt
impl SizeBytes for ApplyLatestAt
source§impl SizeBytes for ComponentColumnSelector
impl SizeBytes for ComponentColumnSelector
source§impl SizeBytes for FilterByRange
impl SizeBytes for FilterByRange
source§impl SizeBytes for FilterIsNotNull
impl SizeBytes for FilterIsNotNull
source§impl SizeBytes for IncludedContent
impl SizeBytes for IncludedContent
source§impl SizeBytes for Interactive
impl SizeBytes for Interactive
source§impl SizeBytes for LockRangeDuringZoom
impl SizeBytes for LockRangeDuringZoom
source§impl SizeBytes for QueryExpression
impl SizeBytes for QueryExpression
source§impl SizeBytes for SelectedColumns
impl SizeBytes for SelectedColumns
source§impl SizeBytes for SpaceViewClass
impl SizeBytes for SpaceViewClass
source§impl SizeBytes for SpaceViewOrigin
impl SizeBytes for SpaceViewOrigin
source§impl SizeBytes for TimelineName
impl SizeBytes for TimelineName
source§impl SizeBytes for ViewerRecommendationHash
impl SizeBytes for ViewerRecommendationHash
source§impl SizeBytes for VisibleTimeRange
impl SizeBytes for VisibleTimeRange
source§impl SizeBytes for VisualBounds2D
impl SizeBytes for VisualBounds2D
source§impl SizeBytes for ComponentColumnSelector
impl SizeBytes for ComponentColumnSelector
source§impl SizeBytes for FilterByRange
impl SizeBytes for FilterByRange
source§impl SizeBytes for FilterIsNotNull
impl SizeBytes for FilterIsNotNull
source§impl SizeBytes for SelectedColumns
impl SizeBytes for SelectedColumns
source§impl SizeBytes for BarChartView
impl SizeBytes for BarChartView
source§impl SizeBytes for DataframeView
impl SizeBytes for DataframeView
source§impl SizeBytes for Spatial2DView
impl SizeBytes for Spatial2DView
source§impl SizeBytes for Spatial3DView
impl SizeBytes for Spatial3DView
source§impl SizeBytes for TensorView
impl SizeBytes for TensorView
source§impl SizeBytes for TextDocumentView
impl SizeBytes for TextDocumentView
source§impl SizeBytes for TextLogView
impl SizeBytes for TextLogView
source§impl SizeBytes for TimeSeriesView
impl SizeBytes for TimeSeriesView
source§impl SizeBytes for AlbedoFactor
impl SizeBytes for AlbedoFactor
source§impl SizeBytes for AnnotationContext
impl SizeBytes for AnnotationContext
source§impl SizeBytes for AxisLength
impl SizeBytes for AxisLength
source§impl SizeBytes for DepthMeter
impl SizeBytes for DepthMeter
source§impl SizeBytes for DisconnectedSpace
impl SizeBytes for DisconnectedSpace
source§impl SizeBytes for EntityPath
impl SizeBytes for EntityPath
source§impl SizeBytes for GammaCorrection
impl SizeBytes for GammaCorrection
source§impl SizeBytes for GeoLineString
impl SizeBytes for GeoLineString
source§impl SizeBytes for HalfSize2D
impl SizeBytes for HalfSize2D
source§impl SizeBytes for HalfSize3D
impl SizeBytes for HalfSize3D
source§impl SizeBytes for ImageBuffer
impl SizeBytes for ImageBuffer
source§impl SizeBytes for ImageFormat
impl SizeBytes for ImageFormat
source§impl SizeBytes for ImagePlaneDistance
impl SizeBytes for ImagePlaneDistance
source§impl SizeBytes for KeypointId
impl SizeBytes for KeypointId
source§impl SizeBytes for LineStrip2D
impl SizeBytes for LineStrip2D
source§impl SizeBytes for LineStrip3D
impl SizeBytes for LineStrip3D
source§impl SizeBytes for MarkerSize
impl SizeBytes for MarkerSize
source§impl SizeBytes for PinholeProjection
impl SizeBytes for PinholeProjection
source§impl SizeBytes for PoseRotationAxisAngle
impl SizeBytes for PoseRotationAxisAngle
source§impl SizeBytes for PoseRotationQuat
impl SizeBytes for PoseRotationQuat
source§impl SizeBytes for PoseScale3D
impl SizeBytes for PoseScale3D
source§impl SizeBytes for PoseTransformMat3x3
impl SizeBytes for PoseTransformMat3x3
source§impl SizeBytes for PoseTranslation3D
impl SizeBytes for PoseTranslation3D
source§impl SizeBytes for Position2D
impl SizeBytes for Position2D
source§impl SizeBytes for Position3D
impl SizeBytes for Position3D
source§impl SizeBytes for Resolution
impl SizeBytes for Resolution
source§impl SizeBytes for RotationAxisAngle
impl SizeBytes for RotationAxisAngle
source§impl SizeBytes for RotationQuat
impl SizeBytes for RotationQuat
source§impl SizeBytes for ShowLabels
impl SizeBytes for ShowLabels
source§impl SizeBytes for StrokeWidth
impl SizeBytes for StrokeWidth
source§impl SizeBytes for TensorData
impl SizeBytes for TensorData
source§impl SizeBytes for TensorHeightDimension
impl SizeBytes for TensorHeightDimension
source§impl SizeBytes for TensorWidthDimension
impl SizeBytes for TensorWidthDimension
source§impl SizeBytes for Texcoord2D
impl SizeBytes for Texcoord2D
source§impl SizeBytes for TextLogLevel
impl SizeBytes for TextLogLevel
source§impl SizeBytes for TransformMat3x3
impl SizeBytes for TransformMat3x3
source§impl SizeBytes for Translation3D
impl SizeBytes for Translation3D
source§impl SizeBytes for TriangleIndices
impl SizeBytes for TriangleIndices
source§impl SizeBytes for ValueRange
impl SizeBytes for ValueRange
source§impl SizeBytes for VideoTimestamp
impl SizeBytes for VideoTimestamp
source§impl SizeBytes for ViewCoordinates
impl SizeBytes for ViewCoordinates
source§impl SizeBytes for AnnotationInfo
impl SizeBytes for AnnotationInfo
source§impl SizeBytes for ClassDescription
impl SizeBytes for ClassDescription
source§impl SizeBytes for ClassDescriptionMapElem
impl SizeBytes for ClassDescriptionMapElem
source§impl SizeBytes for ImageFormat
impl SizeBytes for ImageFormat
source§impl SizeBytes for KeypointId
impl SizeBytes for KeypointId
source§impl SizeBytes for KeypointPair
impl SizeBytes for KeypointPair
source§impl SizeBytes for Quaternion
impl SizeBytes for Quaternion
source§impl SizeBytes for RotationAxisAngle
impl SizeBytes for RotationAxisAngle
source§impl SizeBytes for TensorData
impl SizeBytes for TensorData
source§impl SizeBytes for TensorDimension
impl SizeBytes for TensorDimension
source§impl SizeBytes for TensorDimensionSelection
impl SizeBytes for TensorDimensionSelection
source§impl SizeBytes for VideoTimestamp
impl SizeBytes for VideoTimestamp
source§impl SizeBytes for ViewCoordinates
impl SizeBytes for ViewCoordinates
source§impl SizeBytes for AffixFuzzer1
impl SizeBytes for AffixFuzzer1
source§impl SizeBytes for AffixFuzzer2
impl SizeBytes for AffixFuzzer2
source§impl SizeBytes for AffixFuzzer3
impl SizeBytes for AffixFuzzer3
source§impl SizeBytes for AffixFuzzer4
impl SizeBytes for AffixFuzzer4
source§impl SizeBytes for AffixFuzzer1
impl SizeBytes for AffixFuzzer1
source§impl SizeBytes for AffixFuzzer2
impl SizeBytes for AffixFuzzer2
source§impl SizeBytes for AffixFuzzer3
impl SizeBytes for AffixFuzzer3
source§impl SizeBytes for AffixFuzzer4
impl SizeBytes for AffixFuzzer4
source§impl SizeBytes for AffixFuzzer5
impl SizeBytes for AffixFuzzer5
source§impl SizeBytes for AffixFuzzer6
impl SizeBytes for AffixFuzzer6
source§impl SizeBytes for AffixFuzzer7
impl SizeBytes for AffixFuzzer7
source§impl SizeBytes for AffixFuzzer8
impl SizeBytes for AffixFuzzer8
source§impl SizeBytes for AffixFuzzer9
impl SizeBytes for AffixFuzzer9
source§impl SizeBytes for AffixFuzzer10
impl SizeBytes for AffixFuzzer10
source§impl SizeBytes for AffixFuzzer11
impl SizeBytes for AffixFuzzer11
source§impl SizeBytes for AffixFuzzer12
impl SizeBytes for AffixFuzzer12
source§impl SizeBytes for AffixFuzzer13
impl SizeBytes for AffixFuzzer13
source§impl SizeBytes for AffixFuzzer14
impl SizeBytes for AffixFuzzer14
source§impl SizeBytes for AffixFuzzer15
impl SizeBytes for AffixFuzzer15
source§impl SizeBytes for AffixFuzzer16
impl SizeBytes for AffixFuzzer16
source§impl SizeBytes for AffixFuzzer17
impl SizeBytes for AffixFuzzer17
source§impl SizeBytes for AffixFuzzer18
impl SizeBytes for AffixFuzzer18
source§impl SizeBytes for AffixFuzzer19
impl SizeBytes for AffixFuzzer19
source§impl SizeBytes for AffixFuzzer20
impl SizeBytes for AffixFuzzer20
source§impl SizeBytes for AffixFuzzer21
impl SizeBytes for AffixFuzzer21
source§impl SizeBytes for AffixFuzzer22
impl SizeBytes for AffixFuzzer22
source§impl SizeBytes for AffixFuzzer23
impl SizeBytes for AffixFuzzer23
source§impl SizeBytes for AffixFuzzer1
impl SizeBytes for AffixFuzzer1
source§impl SizeBytes for AffixFuzzer2
impl SizeBytes for AffixFuzzer2
source§impl SizeBytes for AffixFuzzer5
impl SizeBytes for AffixFuzzer5
source§impl SizeBytes for AffixFuzzer20
impl SizeBytes for AffixFuzzer20
source§impl SizeBytes for AffixFuzzer21
impl SizeBytes for AffixFuzzer21
source§impl SizeBytes for AffixFuzzer22
impl SizeBytes for AffixFuzzer22
source§impl SizeBytes for FlattenedScalar
impl SizeBytes for FlattenedScalar
source§impl SizeBytes for PrimitiveComponent
impl SizeBytes for PrimitiveComponent
source§impl SizeBytes for StringComponent
impl SizeBytes for StringComponent
source§impl SizeBytes for String
impl SizeBytes for String
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
Does not take capacity into account.
source§impl<T> SizeBytes for VecDeque<T>where
T: SizeBytes,
impl<T> SizeBytes for VecDeque<T>where
T: SizeBytes,
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
Does not take capacity into account.
source§impl<T> SizeBytes for Vec<T>where
T: SizeBytes,
impl<T> SizeBytes for Vec<T>where
T: SizeBytes,
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
Does not take capacity into account.
source§impl<T, U, V, W> SizeBytes for (T, U, V, W)
impl<T, U, V, W> SizeBytes for (T, U, V, W)
source§impl<T, const N: usize> SizeBytes for [T; N]where
T: SizeBytes,
impl<T, const N: usize> SizeBytes for [T; N]where
T: SizeBytes,
fn heap_size_bytes(&self) -> u64
source§impl<T, const N: usize> SizeBytes for SmallVec<[T; N]>where
T: SizeBytes,
impl<T, const N: usize> SizeBytes for SmallVec<[T; N]>where
T: SizeBytes,
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
Does not take capacity into account.