Struct ate::chain::Chain [−][src]
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]
builder: ChainOfTrustBuilder,
key: &ChainKey
) -> Result<Chain, ChainCreationError>
pub async fn new_ext(
builder: ChainOfTrustBuilder,
key: ChainKey,
extra_loader: Option<Box<dyn Loader>>,
allow_process_errors: bool
) -> Result<Chain, ChainCreationError>
[src]
builder: ChainOfTrustBuilder,
key: ChainKey,
extra_loader: Option<Box<dyn Loader>>,
allow_process_errors: bool
) -> Result<Chain, ChainCreationError>
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]
&'a self,
session: &'a Session,
scope: Scope
) -> Dio<'a>
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]
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,
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]
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,
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]
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,
Trait Implementations
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]
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,