pub struct Writecap { /* private fields */ }
Expand description
Verifies that a principal is authorized to write blocks in a tree.
Implementations§
source§impl Writecap
impl Writecap
pub fn to_cert_chain( &self, subject_key: &AsymKeyPub<Sign> ) -> Result<Vec<Vec<u8>>>
pub fn from_cert_chain<B: AsRef<[u8]>>( first: &B, rest: &[B] ) -> Result<(Writecap, AsymKeyPub<Sign>)>
source§impl Writecap
impl Writecap
sourcepub fn root_signing_key(&self) -> &AsymKeyPub<Sign>
pub fn root_signing_key(&self) -> &AsymKeyPub<Sign>
Returns the root key that was used to sign this writecap.
pub fn issued_to(&self) -> &Principal
sourcepub fn expires(&self) -> Epoch
pub fn expires(&self) -> Epoch
Returns the Epoch representing the instant when this writecap expires.
sourcepub fn root_principal(&self) -> Principal
pub fn root_principal(&self) -> Principal
Returns the principal of the root key which was used to sign this writecap.
sourcepub fn root_block_path(&self) -> BlockPath
pub fn root_block_path(&self) -> BlockPath
Returns the path to the root block of the blocktree that the root principal owns.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Writecap
impl<'de> Deserialize<'de> for Writecap
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Writecap> for Writecap
impl PartialEq<Writecap> for Writecap
impl StructuralPartialEq for Writecap
Auto Trait Implementations§
impl RefUnwindSafe for Writecap
impl Send for Writecap
impl Sync for Writecap
impl Unpin for Writecap
impl UnwindSafe for Writecap
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