Struct zenoh_flow_nodes::prelude::Context
source · pub struct Context { /* private fields */ }Expand description
The Context structure provides information about the data flow and the Zenoh-Flow runtime.
In particular, it allows accessing:
- the name of the data flow,
- the instance id of this instance of the data flow,
- the runtime id of the Zenoh-Flow runtime managing the node.
Implementations§
source§impl Context
impl Context
sourcepub fn new(
flow_name: Arc<str>,
instance_id: InstanceId,
runtime_id: RuntimeId
) -> Self
pub fn new( flow_name: Arc<str>, instance_id: InstanceId, runtime_id: RuntimeId ) -> Self
Creates a new node Context.
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Returns the name of the data flow.
Note all instances of the same data flow will share the same name.
sourcepub fn instance_id(&self) -> &InstanceId
pub fn instance_id(&self) -> &InstanceId
Returns the unique identifier of this instance of the data flow.
sourcepub fn runtime_id(&self) -> &RuntimeId
pub fn runtime_id(&self) -> &RuntimeId
Returns the unique identifier of the Zenoh-Flow runtime managing the node.
Note that, for the same instance, different nodes might return different runtime identifier if they are running on different Zenoh-Flow runtimes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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