pub struct MeshNetworkManager { /* private fields */ }Expand description
Acoustic & BLE Mesh Network Manager
Implementations§
Source§impl MeshNetworkManager
impl MeshNetworkManager
Sourcepub fn initialize(&mut self) -> Result<(), MeshError>
pub fn initialize(&mut self) -> Result<(), MeshError>
Initialize mesh networks
Sourcepub fn discover_nodes(&mut self) -> Result<Vec<DiscoveredNode>, MeshError>
pub fn discover_nodes(&mut self) -> Result<Vec<DiscoveredNode>, MeshError>
Discover nearby nodes
Sourcepub fn discover_nodes_into(
&mut self,
out: &mut [DiscoveredNodeHandle],
) -> Result<usize, MeshError>
pub fn discover_nodes_into( &mut self, out: &mut [DiscoveredNodeHandle], ) -> Result<usize, MeshError>
Discover nearby nodes into a caller-owned zero-heap buffer.
Sourcepub fn send_message(
&mut self,
destination: String,
payload: Vec<u8>,
priority: MessagePriority,
) -> Result<String, MeshError>
pub fn send_message( &mut self, destination: String, payload: Vec<u8>, priority: MessagePriority, ) -> Result<String, MeshError>
Send message through mesh network
Sourcepub fn send_message_ephemeral(
&mut self,
destination: &str,
payload: &[u8],
priority: MessagePriority,
) -> Result<u64, MeshError>
pub fn send_message_ephemeral( &mut self, destination: &str, payload: &[u8], priority: MessagePriority, ) -> Result<u64, MeshError>
Route a transient payload without cloning it into the heap-backed persistence layer.
Sourcepub fn receive_message(
&mut self,
message: StoredMessage,
) -> Result<(), MeshError>
pub fn receive_message( &mut self, message: StoredMessage, ) -> Result<(), MeshError>
Receive message from mesh network
Sourcepub fn get_network_status(&self) -> NetworkStatus
pub fn get_network_status(&self) -> NetworkStatus
Get network status
Sourcepub fn get_performance_stats(&self) -> MeshGlobalMetrics
pub fn get_performance_stats(&self) -> MeshGlobalMetrics
Get performance statistics
Sourcepub fn optimize_network(&mut self) -> Result<(), MeshError>
pub fn optimize_network(&mut self) -> Result<(), MeshError>
Optimize network performance
Auto Trait Implementations§
impl Freeze for MeshNetworkManager
impl RefUnwindSafe for MeshNetworkManager
impl Send for MeshNetworkManager
impl Sync for MeshNetworkManager
impl Unpin for MeshNetworkManager
impl UnsafeUnpin for MeshNetworkManager
impl UnwindSafe for MeshNetworkManager
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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