pub struct VisualizerExecutionOutput {
pub draw_data: Vec<QueueableDrawData>,
pub affinity: Option<ViewClassIdentifier>,
pub reports_per_instruction: Mutex<BTreeMap<VisualizerInstructionId, Vec1<VisualizerInstructionReport>>>,
/* private fields */
}Expand description
Result of running VisualizerSystem::execute.
Contains two kinds of output:
Self::draw_data: GPU render commands, queued by the view for rendering.- Typed visualizer data: CPU-side typed data read back by the view’s own code
(picking, labels, bounding boxes, camera info, plot series, etc.);
see
Self::with_visualizer_data.
Fields§
§draw_data: Vec<QueueableDrawData>GPU render commands produced by the visualizer.
It’s the view’s responsibility to queue this data for rendering.
affinity: Option<ViewClassIdentifier>The view class this visualizer has affinity to, i.e. the value returned by
VisualizerSystem::affinity.
Populated automatically by the execution framework after calling VisualizerSystem::execute.
reports_per_instruction: Mutex<BTreeMap<VisualizerInstructionId, Vec1<VisualizerInstructionReport>>>Per-instruction diagnostics (errors and warnings) encountered during execution.
Shown in the UI for the respective visualizer instruction.
For errors that prevent any visualization at all, return a
ViewSystemExecutionError instead.
Mutex-protected to allow parallel appending across instructions.
Implementations§
Source§impl VisualizerExecutionOutput
impl VisualizerExecutionOutput
Sourcepub fn set_missing_chunks(&self)
pub fn set_missing_chunks(&self)
Indicate that the view should show a loading indicator because data is missing.
Sourcepub fn any_missing_chunks(&self) -> bool
pub fn any_missing_chunks(&self) -> bool
Were any required chunks missing?
Sourcepub fn missing_chunk_reporter(&self) -> &MissingChunkReporter
pub fn missing_chunk_reporter(&self) -> &MissingChunkReporter
Can be used to report missing chunks.
Sourcepub fn report_unspecified_source(
&self,
instruction_id: VisualizerInstructionId,
severity: ViewerReportSeverity,
summary: impl Into<String>,
)
pub fn report_unspecified_source( &self, instruction_id: VisualizerInstructionId, severity: ViewerReportSeverity, summary: impl Into<String>, )
Report a message for a visualizer instruction with the given severity but no component context.
Use Self::report instead when component-specific context is available.
Sourcepub fn report(
&self,
instruction_id: VisualizerInstructionId,
report: VisualizerInstructionReport,
)
pub fn report( &self, instruction_id: VisualizerInstructionId, report: VisualizerInstructionReport, )
Report a detailed diagnostic for a visualizer instruction.
pub fn with_draw_data( self, draw_data: impl IntoIterator<Item = QueueableDrawData>, ) -> Self
Sourcepub fn with_visualizer_data<T: Any + Send + Sync>(self, data: T) -> Self
pub fn with_visualizer_data<T: Any + Send + Sync>(self, data: T) -> Self
Add a typed output payload for this visualizer.
Each type can be stored at most once. Calling this multiple times with the same type overwrites the previous value.
Sourcepub fn get_visualizer_data<T: Any>(&self) -> Option<&T>
pub fn get_visualizer_data<T: Any>(&self) -> Option<&T>
Retrieve a typed output payload previously stored with Self::with_visualizer_data.
Trait Implementations§
Source§impl Default for VisualizerExecutionOutput
impl Default for VisualizerExecutionOutput
Source§fn default() -> VisualizerExecutionOutput
fn default() -> VisualizerExecutionOutput
Auto Trait Implementations§
impl !Freeze for VisualizerExecutionOutput
impl !RefUnwindSafe for VisualizerExecutionOutput
impl !UnwindSafe for VisualizerExecutionOutput
impl Send for VisualizerExecutionOutput
impl Sync for VisualizerExecutionOutput
impl Unpin for VisualizerExecutionOutput
impl UnsafeUnpin for VisualizerExecutionOutput
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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