Struct CorrelationId
#[repr(C)]pub struct CorrelationId(pub u64);Expand description
Correlation ID for request-response patterns.
Tuple Fields§
§0: u64Implementations§
§impl CorrelationId
impl CorrelationId
pub const fn new(id: u64) -> CorrelationId
pub const fn new(id: u64) -> CorrelationId
Create a new correlation ID.
pub fn generate() -> CorrelationId
pub fn generate() -> CorrelationId
Generate a new unique correlation ID.
pub const fn none() -> CorrelationId
pub const fn none() -> CorrelationId
No correlation (for fire-and-forget messages).
Trait Implementations§
§impl Archive for CorrelationIdwhere
u64: Archive,
impl Archive for CorrelationIdwhere
u64: Archive,
§type Archived = ArchivedCorrelationId
type Archived = ArchivedCorrelationId
The archived representation of this type. Read more
§type Resolver = CorrelationIdResolver
type Resolver = CorrelationIdResolver
The resolver for this type. It must contain all the additional information from serializing
needed to make the archived type from the normal type.
§unsafe fn resolve(
&self,
pos: usize,
resolver: <CorrelationId as Archive>::Resolver,
out: *mut <CorrelationId as Archive>::Archived,
)
unsafe fn resolve( &self, pos: usize, resolver: <CorrelationId as Archive>::Resolver, out: *mut <CorrelationId as Archive>::Archived, )
Creates the archived version of this value at the given position and writes it to the given
output. Read more
§impl AsBytes for CorrelationIdwhere
u64: AsBytes,
HasPadding<CorrelationId, ringkernel_core::::message::{impl#30}::{constant#0}>: ShouldBe<false>,
impl AsBytes for CorrelationIdwhere
u64: AsBytes,
HasPadding<CorrelationId, ringkernel_core::::message::{impl#30}::{constant#0}>: ShouldBe<false>,
§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>
fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>
§impl Clone for CorrelationId
impl Clone for CorrelationId
§fn clone(&self) -> CorrelationId
fn clone(&self) -> CorrelationId
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CorrelationId
impl Debug for CorrelationId
§impl Default for CorrelationId
impl Default for CorrelationId
§fn default() -> CorrelationId
fn default() -> CorrelationId
Returns the “default value” for a type. Read more
§impl<__D> Deserialize<CorrelationId, __D> for <CorrelationId as Archive>::Archived
impl<__D> Deserialize<CorrelationId, __D> for <CorrelationId as Archive>::Archived
§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<CorrelationId, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<CorrelationId, <__D as Fallible>::Error>
Deserializes using the given deserializer
§impl FromBytes for CorrelationIdwhere
u64: FromBytes,
impl FromBytes for CorrelationIdwhere
u64: FromBytes,
§fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>where
Self: Sized,
fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>where
Self: Sized,
§fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>where
Self: Sized,
fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>where
Self: Sized,
§fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>where
Self: Sized + AsBytes,
fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>where
Self: Sized + AsBytes,
§fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>where
Self: Sized + AsBytes,
fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>where
Self: Sized + AsBytes,
§fn slice_from(bytes: &[u8]) -> Option<&[Self]>where
Self: Sized,
fn slice_from(bytes: &[u8]) -> Option<&[Self]>where
Self: Sized,
§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
Interprets the prefix of the given
bytes as a &[Self] with length
equal to count without copying. Read more§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
Interprets the suffix of the given
bytes as a &[Self] with length
equal to count without copying. Read more§fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>where
Self: Sized + AsBytes,
fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>where
Self: Sized + AsBytes,
§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + AsBytes,
fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + AsBytes,
Interprets the prefix of the given
bytes as a &mut [Self] with length
equal to count without copying. Read more§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + AsBytes,
fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + AsBytes,
Interprets the suffix of the given
bytes as a &mut [Self] with length
equal to count without copying. Read more§fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
§impl FromZeroes for CorrelationIdwhere
u64: FromZeroes,
impl FromZeroes for CorrelationIdwhere
u64: FromZeroes,
§impl Hash for CorrelationId
impl Hash for CorrelationId
§impl PartialEq for CorrelationId
impl PartialEq for CorrelationId
§impl<__S> Serialize<__S> for CorrelationId
impl<__S> Serialize<__S> for CorrelationId
§fn serialize(
&self,
serializer: &mut __S,
) -> Result<<CorrelationId as Archive>::Resolver, <__S as Fallible>::Error>
fn serialize( &self, serializer: &mut __S, ) -> Result<<CorrelationId as Archive>::Resolver, <__S as Fallible>::Error>
Writes the dependencies for the object and returns a resolver that can create the archived
type.
impl Copy for CorrelationId
impl Eq for CorrelationId
impl Pod for CorrelationId
impl StructuralPartialEq for CorrelationId
Auto Trait Implementations§
impl Freeze for CorrelationId
impl RefUnwindSafe for CorrelationId
impl Send for CorrelationId
impl Sync for CorrelationId
impl Unpin for CorrelationId
impl UnwindSafe for CorrelationId
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive, it may be unsized. Read more§type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
Creates the archived version of the metadata for this value at the given position and writes
it to the given output. Read more
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CallHasher for T
impl<T> CallHasher for T
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§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>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
§impl<T, S> SerializeUnsized<S> for Twhere
T: Serialize<S>,
S: Serializer + ?Sized,
impl<T, S> SerializeUnsized<S> for Twhere
T: Serialize<S>,
S: Serializer + ?Sized,
§fn serialize_unsized(
&self,
serializer: &mut S,
) -> Result<usize, <S as Fallible>::Error>
fn serialize_unsized( &self, serializer: &mut S, ) -> Result<usize, <S as Fallible>::Error>
Writes the object and returns the position of the archived type.
§fn serialize_metadata(&self, _: &mut S) -> Result<(), <S as Fallible>::Error>
fn serialize_metadata(&self, _: &mut S) -> Result<(), <S as Fallible>::Error>
Serializes the metadata for the given type.