pub struct CmnCapsuleEntry {
pub uri: String,
pub key: String,
pub previous_keys: Vec<PreviousKey>,
pub endpoints: Vec<CmnEndpoint>,
}Expand description
A single capsule entry in cmn.json
Fields§
§uri: String§key: String§previous_keys: Vec<PreviousKey>§endpoints: Vec<CmnEndpoint>Implementations§
Source§impl CmnCapsuleEntry
impl CmnCapsuleEntry
pub fn confirms_key(&self, key: &str) -> bool
pub fn find_endpoint(&self, kind: &str) -> Option<&CmnEndpoint>
pub fn find_endpoints(&self, kind: &str) -> Vec<&CmnEndpoint>
pub fn find_archive_endpoint( &self, format: Option<&str>, ) -> Option<&CmnEndpoint>
Sourcepub fn mycelium_hash(&self) -> Option<&str>
pub fn mycelium_hash(&self) -> Option<&str>
Primary mycelium content hash (authoritative metadata).
Sourcepub fn mycelium_hashes(&self) -> &[String]
pub fn mycelium_hashes(&self) -> &[String]
Overflow shard hashes for large domains (spore lists only, metadata ignored).
pub fn mycelium_url(&self, hash: &str) -> Result<String>
pub fn spore_url(&self, hash: &str) -> Result<String>
pub fn archive_url(&self, hash: &str) -> Result<String>
pub fn archive_url_for_format(&self, hash: &str, format: &str) -> Result<String>
pub fn archive_delta_url( &self, hash: &str, old_hash: &str, format: Option<&str>, ) -> Result<Option<String>>
pub fn taste_url(&self, hash: &str) -> Result<String>
Trait Implementations§
Source§impl Clone for CmnCapsuleEntry
impl Clone for CmnCapsuleEntry
Source§fn clone(&self) -> CmnCapsuleEntry
fn clone(&self) -> CmnCapsuleEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CmnCapsuleEntry
impl Debug for CmnCapsuleEntry
Source§impl<'de> Deserialize<'de> for CmnCapsuleEntry
impl<'de> Deserialize<'de> for CmnCapsuleEntry
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
Auto Trait Implementations§
impl Freeze for CmnCapsuleEntry
impl RefUnwindSafe for CmnCapsuleEntry
impl Send for CmnCapsuleEntry
impl Sync for CmnCapsuleEntry
impl Unpin for CmnCapsuleEntry
impl UnsafeUnpin for CmnCapsuleEntry
impl UnwindSafe for CmnCapsuleEntry
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