pub struct ArtifactLocatorV1 { /* private fields */ }Expand description
Public artifact locator. It deliberately carries no backend or object key.
Implementations§
Source§impl ArtifactLocatorV1
impl ArtifactLocatorV1
pub fn new( operation: &OperationLocatorV1, artifact_identity: [u8; 32], bytes: u64, sha256: [u8; 32], expires_at: u64, ) -> Result<Self, OperationLocatorError>
pub const fn collection_id(&self) -> CollectionId
pub const fn recovery_era(&self) -> RecoveryEra
pub const fn operation_identity(&self) -> [u8; 32]
pub const fn operation_binding_digest(&self) -> [u8; 32]
pub const fn artifact_identity(&self) -> [u8; 32]
pub const fn bytes(&self) -> u64
pub const fn sha256(&self) -> [u8; 32]
pub const fn expires_at(&self) -> u64
pub fn require_operation( &self, operation: &OperationLocatorV1, ) -> Result<(), OperationLocatorError>
pub fn encode(&self) -> Vec<u8> ⓘ
pub fn decode(bytes: &[u8]) -> Result<Self, OperationLocatorError>
pub fn validate_current(&self) -> Result<(), OperationLocatorError>
Trait Implementations§
Source§impl Clone for ArtifactLocatorV1
impl Clone for ArtifactLocatorV1
Source§impl Debug for ArtifactLocatorV1
impl Debug for ArtifactLocatorV1
Source§impl<'de> Deserialize<'de> for ArtifactLocatorV1
impl<'de> Deserialize<'de> for ArtifactLocatorV1
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
impl Eq for ArtifactLocatorV1
Source§impl Hash for ArtifactLocatorV1
impl Hash for ArtifactLocatorV1
Source§impl PartialEq for ArtifactLocatorV1
impl PartialEq for ArtifactLocatorV1
Source§impl Serialize for ArtifactLocatorV1
impl Serialize for ArtifactLocatorV1
impl StructuralPartialEq for ArtifactLocatorV1
Auto Trait Implementations§
impl Freeze for ArtifactLocatorV1
impl RefUnwindSafe for ArtifactLocatorV1
impl Send for ArtifactLocatorV1
impl Sync for ArtifactLocatorV1
impl Unpin for ArtifactLocatorV1
impl UnsafeUnpin for ArtifactLocatorV1
impl UnwindSafe for ArtifactLocatorV1
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