pub struct Mycelium {
pub schema: String,
pub capsule: MyceliumCapsule,
pub capsule_signature: String,
}Expand description
Full Mycelium manifest (content-addressed)
Fields§
§schema: String§capsule: MyceliumCapsule§capsule_signature: StringImplementations§
Source§impl Mycelium
impl Mycelium
pub fn new( domain: &str, name: &str, synopsis: &str, updated_at_epoch_ms: u64, ) -> Self
pub fn add_spore( &mut self, id: &str, hash: &str, name: &str, synopsis: Option<&str>, updated_at_epoch_ms: u64, )
pub fn uri(&self) -> &str
pub fn timestamp_ms(&self) -> u64
pub fn embedded_core_key(&self) -> Option<&str>
pub fn spore_hashes(&self) -> impl Iterator<Item = &str>
pub fn verify_core_signature(&self, author_key: &str) -> Result<()>
pub fn verify_capsule_signature(&self, host_key: &str) -> Result<()>
pub fn verify_signatures(&self, host_key: &str, author_key: &str) -> Result<()>
Sourcepub fn verify_self_hosted_signatures(&self, key: &str) -> Result<()>
pub fn verify_self_hosted_signatures(&self, key: &str) -> Result<()>
Verify both signatures using the same key (self-hosted case where host == author).
pub fn computed_uri_hash(&self) -> Result<String>
pub fn verify_uri_hash(&self, expected_hash: &str) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mycelium
impl<'de> Deserialize<'de> for Mycelium
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 PrettyJson for Mycelium
impl PrettyJson for Mycelium
fn to_pretty_json(&self) -> Result<String>
Auto Trait Implementations§
impl Freeze for Mycelium
impl RefUnwindSafe for Mycelium
impl Send for Mycelium
impl Sync for Mycelium
impl Unpin for Mycelium
impl UnsafeUnpin for Mycelium
impl UnwindSafe for Mycelium
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