pub struct DataStore { /* private fields */ }Expand description
The DataStore provides all the methods to access/store/listen and update
all the information stored in zenoh storages.
Implementations§
Source§impl DataStore
impl DataStore
Sourcepub async fn get_runtime_info(&self, rtid: &ZenohId) -> Result<RuntimeInfo>
pub async fn get_runtime_info(&self, rtid: &ZenohId) -> Result<RuntimeInfo>
Gets the RuntimeInfo for the given rtid.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn get_all_runtime_info(&self) -> Result<Vec<RuntimeInfo>>
pub async fn get_all_runtime_info(&self) -> Result<Vec<RuntimeInfo>>
Gets the RuntimeInfo for all the runtimes in the
infrastructure
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn get_runtime_info_by_name(&self, rtid: &str) -> Result<RuntimeInfo>
pub async fn get_runtime_info_by_name(&self, rtid: &str) -> Result<RuntimeInfo>
Gets the RuntimeInfo for the runtime with the
given name rtid.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn remove_runtime_info(&self, rtid: &ZenohId) -> Result<()>
pub async fn remove_runtime_info(&self, rtid: &ZenohId) -> Result<()>
Removes the information for the given runtime rtid.
§Errors
If zenoh delete fails an error variant is returned.
Sourcepub async fn add_runtime_info(
&self,
rtid: &ZenohId,
rt_info: &RuntimeInfo,
) -> Result<()>
pub async fn add_runtime_info( &self, rtid: &ZenohId, rt_info: &RuntimeInfo, ) -> Result<()>
Stores the given RuntimeInfo for the given rtid
in Zenoh.
§Errors
An error variant is returned in case of:
- fails to serialize
- zenoh put fails
Sourcepub async fn get_runtime_config(&self, rtid: &ZenohId) -> Result<RuntimeConfig>
pub async fn get_runtime_config(&self, rtid: &ZenohId) -> Result<RuntimeConfig>
Gets RuntimeConfig for the given rtid
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn subscribe_runtime_config(
&self,
rtid: &ZenohId,
) -> Result<Subscriber<'static, Receiver<Sample>>>
pub async fn subscribe_runtime_config( &self, rtid: &ZenohId, ) -> Result<Subscriber<'static, Receiver<Sample>>>
Subscribes to configuration changes for the given rtid
NOTE: not implemented.
§Errors
An error variant is returned in case of:
- zenoh subscribe fails
- fails to deserialize
Sourcepub async fn remove_runtime_config(&self, rtid: &ZenohId) -> Result<()>
pub async fn remove_runtime_config(&self, rtid: &ZenohId) -> Result<()>
Removes the configuration for the given rtid.
§Errors
If zenoh delete fails an error variant is returned.
Sourcepub async fn add_runtime_config(
&self,
rtid: &ZenohId,
rt_info: &RuntimeConfig,
) -> Result<()>
pub async fn add_runtime_config( &self, rtid: &ZenohId, rt_info: &RuntimeConfig, ) -> Result<()>
Stores the given RuntimeConfig for the given
rtid in Zenoh.
§Errors
An error variant is returned in case of:
- fails to serialize
- zenoh put fails
Sourcepub async fn get_runtime_status(&self, rtid: &ZenohId) -> Result<RuntimeStatus>
pub async fn get_runtime_status(&self, rtid: &ZenohId) -> Result<RuntimeStatus>
Gets the RuntimeStatus for the given runtime rtid.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn remove_runtime_status(&self, rtid: &ZenohId) -> Result<()>
pub async fn remove_runtime_status(&self, rtid: &ZenohId) -> Result<()>
Gets the RuntimeStatus for the given rtid.
§Errors
If zenoh delete fails an error variant is returned.
Sourcepub async fn add_runtime_status(
&self,
rtid: &ZenohId,
rt_info: &RuntimeStatus,
) -> Result<()>
pub async fn add_runtime_status( &self, rtid: &ZenohId, rt_info: &RuntimeStatus, ) -> Result<()>
Stores the given RuntimeStatus for the given rtid
in Zenoh.
§Errors
An error variant is returned in case of:
- fails to serialize
- zenoh put fails
Sourcepub async fn get_runtime_flow_by_instance(
&self,
rtid: &ZenohId,
iid: &Uuid,
) -> Result<DataFlowRecord>
pub async fn get_runtime_flow_by_instance( &self, rtid: &ZenohId, iid: &Uuid, ) -> Result<DataFlowRecord>
Gets the DataFlowRecord running on the given runtime rtid for the
given instance iid.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn get_flow_by_instance(&self, iid: &Uuid) -> Result<DataFlowRecord>
pub async fn get_flow_by_instance(&self, iid: &Uuid) -> Result<DataFlowRecord>
Gets the DataFlowRecord running across the
infrastructure for the instance iid.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn get_runtime_flow_instances(
&self,
rtid: &ZenohId,
fid: &str,
) -> Result<Vec<DataFlowRecord>>
pub async fn get_runtime_flow_instances( &self, rtid: &ZenohId, fid: &str, ) -> Result<Vec<DataFlowRecord>>
Gets all the DataFlowRecord for the given
instance iid running on the given runtime rtid.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn get_flow_instances(&self, fid: &str) -> Result<Vec<DataFlowRecord>>
pub async fn get_flow_instances(&self, fid: &str) -> Result<Vec<DataFlowRecord>>
Gets all the DataFlowRecord running across
the infrastructure for the given flow fid.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn get_all_instances(&self) -> Result<Vec<DataFlowRecord>>
pub async fn get_all_instances(&self) -> Result<Vec<DataFlowRecord>>
Gets all the DataFlowRecord running across the
infrastructure.
Sourcepub async fn get_flow_instance_runtimes(
&self,
iid: &Uuid,
) -> Result<Vec<ZenohId>>
pub async fn get_flow_instance_runtimes( &self, iid: &Uuid, ) -> Result<Vec<ZenohId>>
Gets all the runtimes UUID where the given instance iid is running.
Sourcepub async fn remove_runtime_flow_instance(
&self,
rtid: &ZenohId,
fid: &str,
iid: &Uuid,
) -> Result<()>
pub async fn remove_runtime_flow_instance( &self, rtid: &ZenohId, fid: &str, iid: &Uuid, ) -> Result<()>
Removes information on the given instance iid of the given flow fid
running on the given runtime rtid from Zenoh.
§Errors
If zenoh delete fails an error variant is returned.
Sourcepub async fn add_runtime_flow(
&self,
rtid: &ZenohId,
flow_instance: &DataFlowRecord,
) -> Result<()>
pub async fn add_runtime_flow( &self, rtid: &ZenohId, flow_instance: &DataFlowRecord, ) -> Result<()>
Stores the given DataFlowRecord running on the
given runtime rtid in Zenoh.
§Errors
An error variant is returned in case of:
- fails to serialize
- zenoh put fails
Sourcepub async fn add_graph(&self, graph: &RegistryNode) -> Result<()>
pub async fn add_graph(&self, graph: &RegistryNode) -> Result<()>
Stores the given RegistryNode in the registry’s
Zenoh.
§Errors
An error variant is returned in case of:
- fails to serialize
- zenoh put fails
Sourcepub async fn get_graph(&self, graph_id: &str) -> Result<RegistryNode>
pub async fn get_graph(&self, graph_id: &str) -> Result<RegistryNode>
Gets the RegistryNode associated with the given
graph_id from registry’s Zenoh.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn get_all_graphs(&self) -> Result<Vec<RegistryNode>>
pub async fn get_all_graphs(&self) -> Result<Vec<RegistryNode>>
Gets all the nodes RegistryNode within the
registry’s Zenoh.
§Errors
An error variant is returned in case of:
- no data present in zenoh
- fails to deserialize
Sourcepub async fn delete_graph(&self, graph_id: &str) -> Result<()>
pub async fn delete_graph(&self, graph_id: &str) -> Result<()>
Removes the given node graph_id from registry’s Zenoh.
Sourcepub async fn subscribe_sumbitted_jobs(
&self,
rtid: &ZenohId,
) -> Result<Subscriber<'static, Receiver<Sample>>>
pub async fn subscribe_sumbitted_jobs( &self, rtid: &ZenohId, ) -> Result<Subscriber<'static, Receiver<Sample>>>
Subscribes to the job queue of the given rtid
§Errors
An error variant is returned in case of:
- zenoh subscribe fails
- fails to deserialize
pub async fn del_submitted_job(&self, rtid: &ZenohId, id: &Uuid) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataStore
impl !RefUnwindSafe for DataStore
impl Send for DataStore
impl Sync for DataStore
impl Unpin for DataStore
impl !UnwindSafe for DataStore
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> 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 more