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.
Tuple Fields§
§0: Entry<MCL, MCC, MPL, N, S, PD>§1: ATImplementations§
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Sourcepub fn new(
entry: Entry<MCL, MCC, MPL, N, S, PD>,
token: AT,
) -> Result<Self, UnauthorisedWriteError>where
AT: AuthorisationToken<MCL, MCC, MPL, N, S, PD>,
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>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> Sync for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> Unpin for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> UnwindSafe for AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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