Struct StatusHandle
pub struct StatusHandle {
inner: Arc<RwLock<Status>>,
event_tx: EventSender,
}Fields§
§inner: Arc<RwLock<Status>>§event_tx: EventSenderImplementations§
§impl StatusHandle
impl StatusHandle
pub fn new(event_tx: EventSender) -> Self
fn visit<R>(&self, f: impl FnOnce(&Status) -> R) -> R
fn visit_mut<R>(&self, f: impl FnOnce(&mut Status) -> R) -> R
fn send_event(&self, event: Event)
pub fn full_status(&self) -> Status
pub fn full_status(&self) -> Status
Returns a snapshot of the current status.
pub fn set_synced(&self, ts: SystemTime, is_synced: bool)
pub fn set_synced(&self, ts: SystemTime, is_synced: bool)
Sets the time sync status.
if is_synced is true, ts is used as the last sync time.
Trait Implementations§
§impl Clone for StatusHandle
impl Clone for StatusHandle
§fn clone(&self) -> StatusHandle
fn clone(&self) -> StatusHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StatusHandle
impl RefUnwindSafe for StatusHandle
impl Send for StatusHandle
impl Sync for StatusHandle
impl Unpin for StatusHandle
impl UnwindSafe for StatusHandle
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