Struct ckb_sync::NetTimeProtocol [−][src]
pub struct NetTimeProtocol { /* fields omitted */ }Expand description
Collect time offset samples from network peers and send notify to user if offset is too large
Implementations
impl NetTimeProtocol[src]
impl NetTimeProtocol[src]Trait Implementations
impl CKBProtocolHandler for NetTimeProtocol[src]
impl CKBProtocolHandler for NetTimeProtocol[src]fn init(&mut self, _nc: Arc<dyn CKBProtocolContext + Sync>)[src]
fn init(&mut self, _nc: Arc<dyn CKBProtocolContext + Sync>)[src]Init action on service run
fn connected(
&mut self,
nc: Arc<dyn CKBProtocolContext + Sync>,
peer_index: PeerIndex,
_version: &str
)[src]
fn connected(
&mut self,
nc: Arc<dyn CKBProtocolContext + Sync>,
peer_index: PeerIndex,
_version: &str
)[src]Called when opening protocol
fn received(
&mut self,
nc: Arc<dyn CKBProtocolContext + Sync>,
peer_index: PeerIndex,
data: Bytes
)[src]
fn received(
&mut self,
nc: Arc<dyn CKBProtocolContext + Sync>,
peer_index: PeerIndex,
data: Bytes
)[src]Called when the corresponding protocol message is received
fn disconnected(
&mut self,
_nc: Arc<dyn CKBProtocolContext + 'static + Sync>,
_peer_index: SessionId
)[src]
fn disconnected(
&mut self,
_nc: Arc<dyn CKBProtocolContext + 'static + Sync>,
_peer_index: SessionId
)[src]Called when closing protocol
impl Clone for NetTimeProtocol[src]
impl Clone for NetTimeProtocol[src]Auto Trait Implementations
impl !RefUnwindSafe for NetTimeProtocol
impl Send for NetTimeProtocol
impl Sync for NetTimeProtocol
impl Unpin for NetTimeProtocol
impl UnwindSafe for NetTimeProtocol
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,