pub struct ComponentContext { /* private fields */ }
Expand description
A component context.
Component contexts uniquely identify a component within a topology by coupling the component identifier (name) and component type (source, transform, destination, forwarder, or encoder).
Practically speaking, all components are required to have a unique identifier. However, identifiers may be opaque enough that without knowing the type of component, the identifier doesn’t provide enough information.
Implementations§
Source§impl ComponentContext
impl ComponentContext
Sourcepub fn source(component_id: ComponentId) -> Self
pub fn source(component_id: ComponentId) -> Self
Creates a new ComponentContext
for a source component with the given identifier.
Sourcepub fn transform(component_id: ComponentId) -> Self
pub fn transform(component_id: ComponentId) -> Self
Creates a new ComponentContext
for a transform component with the given identifier.
Sourcepub fn destination(component_id: ComponentId) -> Self
pub fn destination(component_id: ComponentId) -> Self
Creates a new ComponentContext
for a destination component with the given identifier.
Sourcepub fn forwarder(component_id: ComponentId) -> Self
pub fn forwarder(component_id: ComponentId) -> Self
Creates a new ComponentContext
for a forwarder component with the given identifier.
Sourcepub fn encoder(component_id: ComponentId) -> Self
pub fn encoder(component_id: ComponentId) -> Self
Creates a new ComponentContext
for a encoder component with the given identifier.
Sourcepub fn component_id(&self) -> &ComponentId
pub fn component_id(&self) -> &ComponentId
Returns the component identifier.
Sourcepub fn component_type(&self) -> ComponentType
pub fn component_type(&self) -> ComponentType
Returns the component type.
Trait Implementations§
Source§impl Clone for ComponentContext
impl Clone for ComponentContext
Source§fn clone(&self) -> ComponentContext
fn clone(&self) -> ComponentContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ComponentContext
impl RefUnwindSafe for ComponentContext
impl Send for ComponentContext
impl Sync for ComponentContext
impl Unpin for ComponentContext
impl UnwindSafe for ComponentContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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
Source§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Tracked
wrapper. Read more