Struct vapcore_light::client::Service[][src]

pub struct Service<T: 'static> { /* fields omitted */ }

Light client service.

Implementations

impl<T: ChainDataFetcher> Service<T>[src]

pub fn start(
    config: ClientConfig,
    spec: &Spec,
    fetcher: T,
    db: Arc<dyn BlockChainDB>,
    cache: Arc<Mutex<Cache>>
) -> Result<Self, Error>
[src]

Start the service: initialize I/O workers and client itself.

pub fn add_notify(&self, notify: Arc<dyn LightChainNotify>)[src]

Set the actor to be notified on certain chain events

pub fn register_handler(
    &self,
    handler: Arc<dyn IoHandler<ClientIoMessage<()>> + Send>
) -> Result<(), IoError>
[src]

Register an I/O handler on the service.

pub fn client(&self) -> &Arc<Client<T>>[src]

Get a handle to the client.

Auto Trait Implementations

impl<T> !RefUnwindSafe for Service<T>

impl<T> Send for Service<T> where
    T: Send + Sync

impl<T> Sync for Service<T> where
    T: Send + Sync

impl<T> Unpin for Service<T>

impl<T> !UnwindSafe for Service<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[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]

impl<T> Pointable for T

type Init = T

The type for initializers.

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,