Struct ate::chain::Chain[][src]

pub struct Chain where
    Self: Send + Sync
{ /* fields omitted */ }

Represents the main API to access a specific chain-of-trust

This object must stay within scope for the duration of its use which has been optimized for infrequent initialization as creating this object will reload the entire chain’s metadata into memory.

The actual data of the chain is stored locally on disk thus huge chains can be stored here however very random access on large chains will result in random access IO on the disk.

Chains also allow subscribe/publish models to be applied to particular vectors (see the examples for details)

Implementations

impl<'a> Chain[src]

pub async fn new(
    builder: ChainOfTrustBuilder,
    key: &ChainKey
) -> Result<Chain, ChainCreationError>
[src]

pub async fn new_ext(
    builder: ChainOfTrustBuilder,
    key: ChainKey,
    extra_loader: Option<Box<dyn Loader>>,
    allow_process_errors: bool
) -> Result<Chain, ChainCreationError>
[src]

pub fn key(&'a self) -> ChainKey[src]

pub async fn single(&'a self) -> ChainSingleUser<'a>[src]

pub async fn multi(&'a self) -> ChainMultiUser[src]

pub async fn name(&'a self) -> String[src]

pub fn default_format(&'a self) -> MessageFormat[src]

pub async fn rotate(&'a mut self) -> Result<(), Error>[src]

pub async fn compact(&'a mut self) -> Result<(), CompactError>[src]

pub async fn count(&'a self) -> usize[src]

pub async fn flush(&'a self) -> Result<(), Error>[src]

pub async fn sync(&'a self) -> Result<(), CommitError>[src]

pub fn repository(&self) -> Option<Arc<dyn ChainRepository>>[src]

impl Chain[src]

pub async fn dio<'a>(&'a self, session: &'a Session) -> Dio<'a>[src]

pub async fn dio_ext<'a>(
    &'a self,
    session: &'a Session,
    scope: Scope
) -> Dio<'a>
[src]

impl Chain[src]

pub async fn invoke<REQ: ?Sized, RES: ?Sized, ERR: ?Sized>(
    self: Arc<Self>,
    request: REQ
) -> Result<RES, InvokeError<ERR>> where
    REQ: Serialize + DeserializeOwned + Clone + Sync + Send,
    RES: Serialize + DeserializeOwned + Clone + Sync + Send,
    ERR: Serialize + DeserializeOwned + Clone + Sync + Send
[src]

pub async fn invoke_ext<REQ: ?Sized, RES: ?Sized, ERR: ?Sized>(
    self: Arc<Self>,
    session: Option<&Session>,
    request: REQ,
    timeout: Duration
) -> Result<RES, InvokeError<ERR>> where
    REQ: Serialize + DeserializeOwned + Clone + Sync + Send,
    RES: Serialize + DeserializeOwned + Clone + Sync + Send,
    ERR: Serialize + DeserializeOwned + Clone + Sync + Send
[src]

pub fn add_service<REQ: ?Sized, RES: ?Sized, ERR: ?Sized>(
    self: &Arc<Self>,
    session: Session,
    handler: ServiceInstance<REQ, RES, ERR>
) where
    REQ: Serialize + DeserializeOwned + Clone + Sync + Send + 'static,
    RES: Serialize + DeserializeOwned + Clone + Sync + Send + 'static,
    ERR: Debug + Serialize + DeserializeOwned + Clone + Sync + Send + 'static, 
[src]

Trait Implementations

impl Clone for Chain where
    Self: Send + Sync
[src]

Auto Trait Implementations

impl !RefUnwindSafe for Chain

impl Send for Chain

impl Sync for Chain

impl Unpin for Chain

impl !UnwindSafe for Chain

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