pub struct WriteAuthority { /* private fields */ }Expand description
The Controller authority required to accept a write or role transition.
Implementations§
Source§impl WriteAuthority
impl WriteAuthority
Sourcepub fn try_new(
broker_id: i64,
master_epoch: MasterEpoch,
) -> Result<Self, StoreContractViolation>
pub fn try_new( broker_id: i64, master_epoch: MasterEpoch, ) -> Result<Self, StoreContractViolation>
Creates an authority for a non-negative broker identifier and positive epoch.
§Errors
Returns StoreContractViolation::HaInvalidBrokerId when broker_id is negative.
Sourcepub fn try_from_u64(
broker_id: u64,
master_epoch: MasterEpoch,
) -> Result<Self, StoreContractViolation>
pub fn try_from_u64( broker_id: u64, master_epoch: MasterEpoch, ) -> Result<Self, StoreContractViolation>
Creates an authority from a wire broker identifier.
§Errors
Returns StoreContractViolation::HaBrokerIdOutOfRange when the identifier cannot be represented
by the canonical signed broker-id type.
Sourcepub const fn master_epoch(self) -> MasterEpoch
pub const fn master_epoch(self) -> MasterEpoch
Returns the authorized master epoch.
Trait Implementations§
Source§impl Clone for WriteAuthority
impl Clone for WriteAuthority
impl Copy for WriteAuthority
Source§impl Debug for WriteAuthority
impl Debug for WriteAuthority
impl Eq for WriteAuthority
Source§impl Hash for WriteAuthority
impl Hash for WriteAuthority
Source§impl PartialEq for WriteAuthority
impl PartialEq for WriteAuthority
impl StructuralPartialEq for WriteAuthority
Auto Trait Implementations§
impl Forget for WriteAuthority
impl Freeze for WriteAuthority
impl Move for WriteAuthority
impl RefUnwindSafe for WriteAuthority
impl Send for WriteAuthority
impl Sync for WriteAuthority
impl Unpin for WriteAuthority
impl UnsafeUnpin for WriteAuthority
impl UnwindSafe for WriteAuthority
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