Struct AuthorisedEntry

Source
pub struct AuthorisedEntry<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT>(pub Entry<MCL, MCC, MPL, N, S, PD>, pub AT)
where
    N: NamespaceId,
    S: SubspaceId,
    PD: PayloadDigest;
Expand description

An AuthorisedEntry is a pair of an Entry and AuthorisationToken for which [Entry::is_authorised_write] returns true. Definition.

Definition.

Tuple Fields§

§0: Entry<MCL, MCC, MPL, N, S, PD>§1: AT

Implementations§

Source§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>

Source

pub fn new( entry: Entry<MCL, MCC, MPL, N, S, PD>, token: AT, ) -> Result<Self, UnauthorisedWriteError>
where AT: AuthorisationToken<MCL, MCC, MPL, N, S, PD>,

Construct an AuthorisedEntry if the token permits the writing of this entry, otherwise return an UnauthorisedWriteError

Auto Trait Implementations§

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> !Freeze for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> RefUnwindSafe for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> Send for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
where AT: Send, N: Send, S: Send, PD: Send,

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> Sync for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
where AT: Sync, N: Sync, S: Sync, PD: Sync,

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> Unpin for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
where AT: Unpin, N: Unpin, S: Unpin, PD: Unpin,

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> UnwindSafe for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
where AT: UnwindSafe, N: UnwindSafe, S: UnwindSafe, PD: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.