pub struct UseOnlineStatus {
pub online: Signal<bool>,
/* private fields */
}Expand description
Reactive state for the browser’s online status.
The handle carries the current answer and the teardown that removes
the online / offline listeners from the window.
The answer is a Signal<bool>: a render closure that reads it
re-renders when the connection state changes.
Fields§
§online: Signal<bool>Whether the browser believes it is online.
Implementations§
Source§impl UseOnlineStatus
Inherent implementation of UseOnlineStatus.
impl UseOnlineStatus
Inherent implementation of UseOnlineStatus.
Source§impl UseOnlineStatus
impl UseOnlineStatus
pub fn get_online(&self) -> Signal<bool>
pub fn get_mut_online(&mut self) -> &mut Signal<bool>
pub fn set_online(&mut self, val: Signal<bool>) -> &mut Self
pub fn get_mut_teardown(&mut self) -> &mut Rc<RefCell<Option<Box<dyn Fn()>>>>
pub fn set_teardown( &mut self, val: Rc<RefCell<Option<Box<dyn Fn()>>>>, ) -> &mut Self
Trait Implementations§
Source§impl Clone for UseOnlineStatus
impl Clone for UseOnlineStatus
Source§impl Debug for UseOnlineStatus
impl Debug for UseOnlineStatus
Auto Trait Implementations§
impl !RefUnwindSafe for UseOnlineStatus
impl !Send for UseOnlineStatus
impl !Sync for UseOnlineStatus
impl !UnwindSafe for UseOnlineStatus
impl Freeze for UseOnlineStatus
impl Unpin for UseOnlineStatus
impl UnsafeUnpin for UseOnlineStatus
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