Struct ckb_network::BlockingFlag
source · [−]pub struct BlockingFlag(_);Expand description
Control whether the protocol handle method requires blocking to run default is 0b1111, all function use blocking
flag & 0b1000 > 0 means connected use blocking
flag & 0b0100 > 0 means disconnected use blocking
flag & 0b0010 > 0 means received use blocking
flag & 0b0001 > 0 means notify use blocking
Implementations
sourceimpl BlockingFlag
impl BlockingFlag
sourcepub fn disable_connected(&mut self)
pub fn disable_connected(&mut self)
connected don’t use blocking
sourcepub fn disable_disconnected(&mut self)
pub fn disable_disconnected(&mut self)
disconnected don’t use blocking
sourcepub fn disable_received(&mut self)
pub fn disable_received(&mut self)
received don’t use blocking
sourcepub fn disable_notify(&mut self)
pub fn disable_notify(&mut self)
notify don’t use blocking
sourcepub fn enable_all(&mut self)
pub fn enable_all(&mut self)
all function use blocking
sourcepub fn disable_all(&mut self)
pub fn disable_all(&mut self)
all function don’t use blocking
sourcepub const fn disconnected(self) -> bool
pub const fn disconnected(self) -> bool
return true if disconnected enable
Trait Implementations
sourceimpl Clone for BlockingFlag
impl Clone for BlockingFlag
sourcefn clone(&self) -> BlockingFlag
fn clone(&self) -> BlockingFlag
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for BlockingFlag
impl Debug for BlockingFlag
sourceimpl Default for BlockingFlag
impl Default for BlockingFlag
sourcefn default() -> BlockingFlag
fn default() -> BlockingFlag
Returns the “default value” for a type. Read more
sourceimpl From<u8> for BlockingFlag
impl From<u8> for BlockingFlag
sourcefn from(inner: u8) -> BlockingFlag
fn from(inner: u8) -> BlockingFlag
Performs the conversion.
impl Copy for BlockingFlag
Auto Trait Implementations
impl RefUnwindSafe for BlockingFlag
impl Send for BlockingFlag
impl Sync for BlockingFlag
impl Unpin for BlockingFlag
impl UnwindSafe for BlockingFlag
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more