pub struct WeaveState {
pub connected: bool,
pub switch_id: Option<[u8; 4]>,
pub endpoint_id: Option<[u8; 8]>,
pub cpu_load: Option<u8>,
pub mem_load: Option<f64>,
pub peers: HashMap<[u8; 8], WeavePeerState>,
pub logs: VecDeque<WeaveLogFrame>,
pub display: Vec<u8>,
pub unknown_events: VecDeque<WeaveLogFrame>,
/* private fields */
}Fields§
§connected: bool§switch_id: Option<[u8; 4]>§endpoint_id: Option<[u8; 8]>§cpu_load: Option<u8>§mem_load: Option<f64>§peers: HashMap<[u8; 8], WeavePeerState>§logs: VecDeque<WeaveLogFrame>§display: Vec<u8>§unknown_events: VecDeque<WeaveLogFrame>Implementations§
Source§impl WeaveState
impl WeaveState
pub fn accept_packet(&mut self, packet: &[u8], now: f64) -> bool
pub fn handle_log(&mut self, frame: WeaveLogFrame, now: f64)
pub fn expire_peers(&mut self, now: f64) -> Vec<[u8; 8]>
pub fn apply_display( &mut self, offset: usize, total: usize, fragment: &[u8], ) -> bool
Trait Implementations§
Source§impl Clone for WeaveState
impl Clone for WeaveState
Source§fn clone(&self) -> WeaveState
fn clone(&self) -> WeaveState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WeaveState
impl Debug for WeaveState
Source§impl Default for WeaveState
impl Default for WeaveState
Source§fn default() -> WeaveState
fn default() -> WeaveState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WeaveState
impl RefUnwindSafe for WeaveState
impl Send for WeaveState
impl Sync for WeaveState
impl Unpin for WeaveState
impl UnsafeUnpin for WeaveState
impl UnwindSafe for WeaveState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
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