pub struct ArtifactRef { /* private fields */ }Expand description
Storage-neutral reference to one immutable artifact revision.
Implementations§
Source§impl ArtifactRef
impl ArtifactRef
Sourcepub const fn new(
id: ArtifactId,
digest: Sha256Digest,
media_type: MediaType,
size: ArtifactSize,
) -> ArtifactRef
pub const fn new( id: ArtifactId, digest: Sha256Digest, media_type: MediaType, size: ArtifactSize, ) -> ArtifactRef
Construct a reference from already parsed values.
Sourcepub const fn id(&self) -> ArtifactId
pub const fn id(&self) -> ArtifactId
Return the immutable artifact identity.
Sourcepub fn digest(&self) -> &Sha256Digest
pub fn digest(&self) -> &Sha256Digest
Return the authoritative plaintext digest.
Sourcepub fn media_type(&self) -> &MediaType
pub fn media_type(&self) -> &MediaType
Return the authoritative plaintext media type.
Sourcepub const fn size(&self) -> ArtifactSize
pub const fn size(&self) -> ArtifactSize
Return the authoritative plaintext length.
Trait Implementations§
Source§impl Clone for ArtifactRef
impl Clone for ArtifactRef
Source§fn clone(&self) -> ArtifactRef
fn clone(&self) -> ArtifactRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ArtifactRef
impl Debug for ArtifactRef
Source§impl<'de> Deserialize<'de> for ArtifactRef
impl<'de> Deserialize<'de> for ArtifactRef
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArtifactRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArtifactRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ArtifactRef
Source§impl Hash for ArtifactRef
impl Hash for ArtifactRef
Source§impl PartialEq for ArtifactRef
impl PartialEq for ArtifactRef
Source§impl Serialize for ArtifactRef
impl Serialize for ArtifactRef
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ArtifactRef
Auto Trait Implementations§
impl Forget for ArtifactRef
impl Freeze for ArtifactRefwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
&'static str: Freeze,
PhantomData<(Indexed, Indexed)>: Freeze,
impl Move for ArtifactRef
impl RefUnwindSafe for ArtifactRef
impl Send for ArtifactRef
impl Sync for ArtifactRefwhere
RawVecInner: Sync,
impl Unpin for ArtifactRef
impl UnsafeUnpin for ArtifactRefwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
PhantomData<(Indexed, Indexed)>: UnsafeUnpin,
impl UnwindSafe for ArtifactRef
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