pub struct CmnEntry {
pub schema: String,
pub protocol_versions: Vec<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§protocol_versions: Vec<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 effective_protocol_versions(&self) -> Vec<&str>
pub fn supports_protocol_version(&self, version: &str) -> bool
pub fn verify_signature(&self, host_key: &str) -> Result<()>
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