Struct vapcore_sync::light_sync::LightSync [−][src]
Light client synchronization manager. See module docs for more details.
Implementations
impl<L: AsLightClient> LightSync<L>[src]
pub fn new(client: Arc<L>) -> Result<Self, Error>[src]
Create a new instance of LightSync.
This won’t do anything until registered as a handler so it can act on events.
Trait Implementations
impl<L: AsLightClient + Send + Sync> Handler for LightSync<L>[src]
fn on_connect(
&self,
ctx: &dyn EventContext,
status: &Status,
capabilities: &Capabilities
) -> PeerStatus[src]
&self,
ctx: &dyn EventContext,
status: &Status,
capabilities: &Capabilities
) -> PeerStatus
fn on_disconnect(&self, ctx: &dyn EventContext, unfulfilled: &[ReqId])[src]
fn on_announcement(&self, ctx: &dyn EventContext, announcement: &Announcement)[src]
fn on_responses(
&self,
ctx: &dyn EventContext,
req_id: ReqId,
responses: &[Response]
)[src]
&self,
ctx: &dyn EventContext,
req_id: ReqId,
responses: &[Response]
)
fn tick(&self, ctx: &dyn BasicContext)[src]
pub fn on_transactions(
&self,
_ctx: &dyn EventContext,
_relay: &[UnverifiedTransaction]
)[src]
&self,
_ctx: &dyn EventContext,
_relay: &[UnverifiedTransaction]
)
pub fn on_transaction_proof(
&self,
_ctx: &dyn EventContext,
_req_id: ReqId,
_state_items: &[Vec<u8, Global>]
)[src]
&self,
_ctx: &dyn EventContext,
_req_id: ReqId,
_state_items: &[Vec<u8, Global>]
)
pub fn on_abort(&self)[src]
impl<L: AsLightClient> SyncInfo for LightSync<L>[src]
fn highest_block(&self) -> Option<u64>[src]
fn start_block(&self) -> u64[src]
fn is_major_importing(&self) -> bool[src]
fn sync_notification(&self) -> Notification<ChainSyncState>[src]
Auto Trait Implementations
impl<L> !RefUnwindSafe for LightSync<L>
impl<L> Send for LightSync<L> where
L: Send + Sync,
L: Send + Sync,
impl<L> Sync for LightSync<L> where
L: Send + Sync,
L: Send + Sync,
impl<L> Unpin for LightSync<L>
impl<L> !UnwindSafe for LightSync<L>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Erased for T
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,