pub struct ObjectReference {
pub object_id: ObjectId,
pub version: Version,
pub digest: ObjectDigest,
}Expand description
Reference to an object
Contains sufficient information to uniquely identify a specific object.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
object-reference = object-id u64 object-digestFields§
§object_id: ObjectIdThe object id of this object.
version: VersionThe version of this object.
digest: ObjectDigestThe digest of this object.
Implementations§
Source§impl ObjectReference
impl ObjectReference
Sourcepub const fn new(
object_id: ObjectId,
version: Version,
digest: ObjectDigest,
) -> Self
pub const fn new( object_id: ObjectId, version: Version, digest: ObjectDigest, ) -> Self
Creates a new object reference from the object’s id, version, and digest.
Sourcepub fn object_id(&self) -> &ObjectId
pub fn object_id(&self) -> &ObjectId
Returns a reference to the object id that this ObjectReference is referring to.
Sourcepub fn version(&self) -> Version
pub fn version(&self) -> Version
Returns the version of the object that this ObjectReference is referring to.
Sourcepub fn digest(&self) -> &ObjectDigest
pub fn digest(&self) -> &ObjectDigest
Returns the digest of the object that this ObjectReference is referring to.
Sourcepub fn into_parts(self) -> (ObjectId, Version, ObjectDigest)
pub fn into_parts(self) -> (ObjectId, Version, ObjectDigest)
Returns a 3-tuple containing the object id, version, and digest.
Trait Implementations§
Source§impl Arbitrary for ObjectReference
Available on crate feature proptest only.
impl Arbitrary for ObjectReference
Available on crate feature
proptest only.Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<ObjectReference>
type Strategy = BoxedStrategy<ObjectReference>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(
args_shared: <Self as Arbitrary>::Parameters,
) -> Self::Strategy
fn arbitrary_with( args_shared: <Self as Arbitrary>::Parameters, ) -> Self::Strategy
Source§impl Clone for ObjectReference
impl Clone for ObjectReference
Source§fn clone(&self) -> ObjectReference
fn clone(&self) -> ObjectReference
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 moreimpl Copy for ObjectReference
Source§impl Debug for ObjectReference
impl Debug for ObjectReference
Source§impl<'de> Deserialize<'de> for ObjectReference
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ObjectReference
Available on crate feature
serde only.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 Display for ObjectReference
impl Display for ObjectReference
impl Eq for ObjectReference
Source§impl Hash for ObjectReference
impl Hash for ObjectReference
Source§impl Ord for ObjectReference
impl Ord for ObjectReference
Source§fn cmp(&self, other: &ObjectReference) -> Ordering
fn cmp(&self, other: &ObjectReference) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ObjectReference
impl PartialEq for ObjectReference
Source§impl PartialOrd for ObjectReference
impl PartialOrd for ObjectReference
Source§impl Serialize for ObjectReference
Available on crate feature serde only.
impl Serialize for ObjectReference
Available on crate feature
serde only.impl StructuralPartialEq for ObjectReference
Auto Trait Implementations§
impl Freeze for ObjectReference
impl RefUnwindSafe for ObjectReference
impl Send for ObjectReference
impl Sync for ObjectReference
impl Unpin for ObjectReference
impl UnsafeUnpin for ObjectReference
impl UnwindSafe for ObjectReference
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