pub struct BlockMeta { /* private fields */ }
Expand description
Signed metadata associated with a block.
Implementations§
source§impl BlockMeta
impl BlockMeta
sourcepub fn assert_valid(&self, path: &BlockPath) -> Result<()>
pub fn assert_valid(&self, path: &BlockPath) -> Result<()>
Validates that this metadata struct contains a valid writecap, that this writecap is permitted to write to the path of this block and that the signature in this metadata struct is valid and matches the key the writecap was issued to.
source§impl BlockMeta
impl BlockMeta
sourcepub fn new<C: Creds>(creds: &C) -> Result<BlockMeta>
pub fn new<C: Creds>(creds: &C) -> Result<BlockMeta>
Creates a new BlockMeta struct which is authenticated by the given credentials.
sourcepub fn body(&self) -> &BlockMetaBody
pub fn body(&self) -> &BlockMetaBody
Returns a reference to the BlockMetaBody contained in this struct.
sourcepub fn mut_body(&mut self) -> &mut BlockMetaBody
pub fn mut_body(&mut self) -> &mut BlockMetaBody
Returns a mutable reference to the BlockMetaBody contained in this struct.
Trait Implementations§
source§impl<T, C> AsMut<BlockMeta> for BlockStream<T, C>
impl<T, C> AsMut<BlockMeta> for BlockStream<T, C>
source§impl AsMut<BlockMetaBody> for BlockMeta
impl AsMut<BlockMetaBody> for BlockMeta
source§fn as_mut(&mut self) -> &mut BlockMetaBody
fn as_mut(&mut self) -> &mut BlockMetaBody
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<T, C> AsRef<BlockMeta> for BlockStream<T, C>
impl<T, C> AsRef<BlockMeta> for BlockStream<T, C>
source§impl AsRef<BlockMetaBody> for BlockMeta
impl AsRef<BlockMetaBody> for BlockMeta
source§fn as_ref(&self) -> &BlockMetaBody
fn as_ref(&self) -> &BlockMetaBody
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<'de> Deserialize<'de> for BlockMeta
impl<'de> Deserialize<'de> for BlockMeta
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<BlockMeta> for BlockMeta
impl PartialEq<BlockMeta> for BlockMeta
impl StructuralPartialEq for BlockMeta
Auto Trait Implementations§
impl RefUnwindSafe for BlockMeta
impl Send for BlockMeta
impl Sync for BlockMeta
impl Unpin for BlockMeta
impl UnwindSafe for BlockMeta
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