pub struct CmnEntry {
pub schema: String,
pub capsules: Vec<CmnCapsuleEntry>,
pub capsule_signature: String,
}Expand description
CMN Entry - the cmn.json file at /.well-known/cmn.json
Contains an array of capsules, each with a URI, public key, and typed endpoints for resolving all resource types.
Fields§
§schema: String§capsules: Vec<CmnCapsuleEntry>§capsule_signature: StringImplementations§
Source§impl CmnEntry
impl CmnEntry
pub fn new(capsules: Vec<CmnCapsuleEntry>) -> Self
pub fn primary_capsule(&self) -> Result<&CmnCapsuleEntry>
pub fn uri(&self) -> Result<&str>
pub fn primary_key(&self) -> Result<&str>
pub fn primary_confirms_key(&self, key: &str) -> Result<bool>
pub fn primary_key_confirmation_at( &self, key: &str, signed_at_epoch_ms: u64, ) -> Result<Option<KeyConfirmation>>
pub fn primary_confirms_key_at( &self, key: &str, signed_at_epoch_ms: u64, ) -> Result<bool>
pub fn verify_signature(&self, host_key: &str) -> Result<()>
pub fn capsules_digest(&self) -> Result<String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CmnEntry
impl<'de> Deserialize<'de> for CmnEntry
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 CmnEntry
impl PrettyJson for CmnEntry
fn to_pretty_json(&self) -> Result<String>
Auto Trait Implementations§
impl Freeze for CmnEntry
impl RefUnwindSafe for CmnEntry
impl Send for CmnEntry
impl Sync for CmnEntry
impl Unpin for CmnEntry
impl UnsafeUnpin for CmnEntry
impl UnwindSafe for CmnEntry
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