pub enum BlobLocator {
Opaque {
namespace: String,
blob_id: String,
uploader: StoreDeviceRegistrationRef,
audience: RemoteAudience,
scope: BlobScope,
key_fingerprint: KeyFingerprint,
plaintext_size: u64,
plaintext_hash: ObjectHash,
},
Browsable {
namespace: String,
blob_id: String,
uploader: StoreDeviceRegistrationRef,
cloud_path: String,
plaintext_size: u64,
plaintext_hash: ObjectHash,
},
}Expand description
The exact semantic cloud slot and verification facts committed with one row.
Variants§
Opaque
Fields
§
uploader: StoreDeviceRegistrationRef§
audience: RemoteAudience§
key_fingerprint: KeyFingerprint§
plaintext_hash: ObjectHashBrowsable
Implementations§
Source§impl BlobLocator
impl BlobLocator
pub fn opaque( namespace: impl Into<String>, blob_id: impl Into<String>, uploader: StoreDeviceRegistrationRef, audience: RemoteAudience, scope: BlobScope, key_fingerprint: KeyFingerprint, plaintext_size: u64, plaintext_hash: ObjectHash, ) -> Result<Self, BlobLocatorError>
pub fn browsable( namespace: impl Into<String>, blob_id: impl Into<String>, uploader: StoreDeviceRegistrationRef, cloud_path: impl Into<String>, plaintext_size: u64, plaintext_hash: ObjectHash, ) -> Result<Self, BlobLocatorError>
pub fn parse(bytes: &[u8]) -> Result<Self, BlobLocatorError>
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn locator_hash(&self) -> ObjectHash
pub fn semantic_key(&self) -> String
Sourcepub fn is_sealed(&self) -> bool
pub fn is_sealed(&self) -> bool
Whether the stored object is sealed — an opaque home’s blob, carrying a per-chunk authenticator. A browsable home stores the plaintext verbatim, so its object can only be verified as a whole against the row’s hash.
pub fn namespace(&self) -> &str
pub fn blob_id(&self) -> &str
pub fn uploader(&self) -> &StoreDeviceRegistrationRef
pub fn audience(&self) -> RemoteAudience
pub fn plaintext_size(&self) -> u64
pub fn plaintext_hash(&self) -> ObjectHash
pub fn scope(&self) -> Option<&BlobScope>
pub fn key_fingerprint(&self) -> Option<KeyFingerprint>
pub fn cloud_path(&self) -> Option<&str>
pub fn validate(&self) -> Result<(), BlobLocatorError>
Trait Implementations§
Source§impl Clone for BlobLocator
impl Clone for BlobLocator
Source§fn clone(&self) -> BlobLocator
fn clone(&self) -> BlobLocator
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 BlobLocator
impl Debug for BlobLocator
Source§impl<'de> Deserialize<'de> for BlobLocator
impl<'de> Deserialize<'de> for BlobLocator
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 for BlobLocator
impl PartialEq for BlobLocator
Source§impl Serialize for BlobLocator
impl Serialize for BlobLocator
impl Eq for BlobLocator
impl StructuralPartialEq for BlobLocator
Auto Trait Implementations§
impl Freeze for BlobLocator
impl RefUnwindSafe for BlobLocator
impl Send for BlobLocator
impl Sync for BlobLocator
impl Unpin for BlobLocator
impl UnsafeUnpin for BlobLocator
impl UnwindSafe for BlobLocator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.