pub struct LegacyPipelineAdapter { /* private fields */ }Expand description
Adapter for legacy PipelineObserver compatibility.
This struct wraps a VoidObserver and can be used where the legacy PipelineObserver trait is expected. The actual PipelineObserver impl is in pipeline/events.rs to avoid circular dependencies.
Implementations§
Source§impl LegacyPipelineAdapter
impl LegacyPipelineAdapter
Sourcepub fn new(observer: Arc<dyn VoidObserver>) -> Self
pub fn new(observer: Arc<dyn VoidObserver>) -> Self
Create a new legacy adapter wrapping a VoidObserver.
§Arguments
observer- The VoidObserver to wrap.
Sourcepub fn inner(&self) -> &Arc<dyn VoidObserver>
pub fn inner(&self) -> &Arc<dyn VoidObserver>
Get a reference to the inner observer.
Sourcepub fn emit(&self, event: PipelineEvent)
pub fn emit(&self, event: PipelineEvent)
Emit a pipeline event through the wrapped observer.
This method converts the legacy PipelineEvent to the unified event system and forwards it to the wrapped observer.
Trait Implementations§
Source§impl Debug for LegacyPipelineAdapter
impl Debug for LegacyPipelineAdapter
Source§impl PipelineObserver for LegacyPipelineAdapter
impl PipelineObserver for LegacyPipelineAdapter
Source§fn on_event(&self, event: &PipelineEvent)
fn on_event(&self, event: &PipelineEvent)
Called when an event occurs.
Auto Trait Implementations§
impl Freeze for LegacyPipelineAdapter
impl !RefUnwindSafe for LegacyPipelineAdapter
impl Send for LegacyPipelineAdapter
impl Sync for LegacyPipelineAdapter
impl Unpin for LegacyPipelineAdapter
impl UnsafeUnpin for LegacyPipelineAdapter
impl !UnwindSafe for LegacyPipelineAdapter
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more