pub struct RecordIdentifier(/* private fields */);
Expand description
The identifier of a record.
Implementations§
Source§impl RecordIdentifier
impl RecordIdentifier
Sourcepub fn new(
namespace: impl Into<NamespaceId>,
author: impl Into<AuthorId>,
key: impl AsRef<[u8]>,
) -> Self
pub fn new( namespace: impl Into<NamespaceId>, author: impl Into<AuthorId>, key: impl AsRef<[u8]>, ) -> Self
Create a new RecordIdentifier
.
Sourcepub fn as_bytes(&self) -> Bytes
pub fn as_bytes(&self) -> Bytes
Get this RecordIdentifier
as [Bytes].
Sourcepub fn as_byte_tuple(&self) -> (&[u8; 32], &[u8; 32], &[u8])
pub fn as_byte_tuple(&self) -> (&[u8; 32], &[u8; 32], &[u8])
Get this RecordIdentifier
as a tuple of byte slices.
Sourcepub fn to_byte_tuple(&self) -> ([u8; 32], [u8; 32], Bytes)
pub fn to_byte_tuple(&self) -> ([u8; 32], [u8; 32], Bytes)
Get this RecordIdentifier
as a tuple of bytes.
Sourcepub fn namespace(&self) -> NamespaceId
pub fn namespace(&self) -> NamespaceId
Get the NamespaceId
of this record as byte array.
Get the AuthorId
of this record as byte array.
Trait Implementations§
Source§impl AsRef<[u8]> for RecordIdentifier
impl AsRef<[u8]> for RecordIdentifier
Source§impl Clone for RecordIdentifier
impl Clone for RecordIdentifier
Source§fn clone(&self) -> RecordIdentifier
fn clone(&self) -> RecordIdentifier
Returns a copy 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 RecordIdentifier
impl Debug for RecordIdentifier
Source§impl Default for RecordIdentifier
impl Default for RecordIdentifier
Source§impl<'de> Deserialize<'de> for RecordIdentifier
impl<'de> Deserialize<'de> for RecordIdentifier
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 Ord for RecordIdentifier
impl Ord for RecordIdentifier
Source§fn cmp(&self, other: &RecordIdentifier) -> Ordering
fn cmp(&self, other: &RecordIdentifier) -> Ordering
1.21.0 · 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
Source§impl PartialEq for RecordIdentifier
impl PartialEq for RecordIdentifier
Source§impl PartialOrd for RecordIdentifier
impl PartialOrd for RecordIdentifier
Source§impl Serialize for RecordIdentifier
impl Serialize for RecordIdentifier
impl Eq for RecordIdentifier
impl StructuralPartialEq for RecordIdentifier
Auto Trait Implementations§
impl !Freeze for RecordIdentifier
impl RefUnwindSafe for RecordIdentifier
impl Send for RecordIdentifier
impl Sync for RecordIdentifier
impl Unpin for RecordIdentifier
impl UnwindSafe for RecordIdentifier
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)