Struct libqaul::Qaul[][src]

pub struct Qaul { /* fields omitted */ }

Primary context structure for libqaul

Handles user state, secret storage, network state, I/O and services. Check api for the extended service API

Bootstrapping

Starting an instance of libqaul requires several steps. For one, it needs to be initialised with a valid config for the routing-layer (RATMAN). This requires choosing of network backends and client configuration.

Secondly, libqaul by itself does very little, except handle service requests. The service API exposes various workloads available, but the consuming services also need to be configured, externally to libqaul and this instance.

A bootstrapping procedure should thus look as follows:

  1. RATMAN + netmod initialisation
  2. libqaul startup (this struct, call new(...))
  3. Initialise services with a libqaul instance reference
  4. Your application is now ready for use

Implementations

impl Qaul[src]

pub fn new(router: Arc<Router>) -> QaulRef[src]

Create new qaul context, with pre-initialised Router

This function sets up discovery and API handler threads, as well as local storage. Stopping a qaul instance is currently not possible (woops). This call is non-blocking and assumes that the main thread will take over execution of some other application loop so to enable further API abstractions to hook into the service API.

pub fn messages(&self) -> Messages<'_>[src]

Get messages function scope

pub fn users(&self) -> Users<'_>[src]

Get users function scope

pub fn contacts(&self) -> Contacts<'_>[src]

Get contact book function scope

pub fn services(&self) -> Services<'_>[src]

Get service management function scope

Trait Implementations

impl Clone for Qaul[src]

Auto Trait Implementations

impl !RefUnwindSafe for Qaul

impl Send for Qaul

impl Sync for Qaul

impl Unpin for Qaul

impl !UnwindSafe for Qaul

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> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>, 

impl<T> WithSubscriber for T[src]