Struct re_space_view_spatial::visualizers::utilities::labels::LabeledBatch
source · pub struct LabeledBatch<'a, P: 'a, I: Iterator<Item = P> + 'a> {
pub entity_path: &'a EntityPath,
pub num_instances: usize,
pub overall_position: P,
pub instance_positions: I,
pub labels: &'a [ArrowString],
pub colors: &'a [Color32],
pub show_labels: ShowLabels,
pub annotation_infos: &'a ResolvedAnnotationInfos,
}
Expand description
Inputs for process_labels()
, defining the label(s) of a single batch.
P
is the type of the positions of the labels, which might be 3D or 2D.I
is the type of the iterator over positions.
Fields§
§entity_path: &'a EntityPath
§num_instances: usize
num_instances
should be equal to the length of instance_positions
.
overall_position: P
The position where a single shared label will be displayed if it is. This is typically the center of the bounding box of the entity.
instance_positions: I
Note: If we find a reason to make this data type usable more than once,
replace this Iterator
with IntoIterator
.
labels: &'a [ArrowString]
Label data from the batch.
Length 1 is treated as a label for the whole batch.
The number of per-instance labels actually drawn is the minimum of the lengths of
instance_positions
and labels
.
colors: &'a [Color32]
Colors from the batch to apply to the labels.
Length 1 is treated as a color for the whole batch.
show_labels: ShowLabels
The ShowLabels
component value.
If no value is available from the data, use show_labels_fallback
to obtain it.
annotation_infos: &'a ResolvedAnnotationInfos
Auto Trait Implementations§
impl<'a, P, I> Freeze for LabeledBatch<'a, P, I>
impl<'a, P, I> RefUnwindSafe for LabeledBatch<'a, P, I>where
P: RefUnwindSafe,
I: RefUnwindSafe,
impl<'a, P, I> Send for LabeledBatch<'a, P, I>
impl<'a, P, I> Sync for LabeledBatch<'a, P, I>
impl<'a, P, I> Unpin for LabeledBatch<'a, P, I>
impl<'a, P, I> UnwindSafe for LabeledBatch<'a, P, I>where
P: UnwindSafe,
I: UnwindSafe,
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