Struct rabble::CorrelationId
[−]
[src]
pub struct CorrelationId { pub pid: Pid, pub connection: Option<u64>, pub request: Option<u64>, }
Match requests through the system with their handlers
All correlation ids must have a pid. Sometimes individual connections/requests aren't tracked so that field is optional.
Fields
pid: Pid
connection: Option<u64>
request: Option<u64>
Methods
impl CorrelationId
[src]
fn pid(pid: Pid) -> CorrelationId
fn connection(pid: Pid, connection_id: u64) -> CorrelationId
Create a correlation id that matches a handler and connection
fn request(pid: Pid, connection_id: u64, request_id: u64) -> CorrelationId
Create a correlation id that matches a handler, connection, and request
fn next_request(&self) -> CorrelationId
Clone the CorrelationId and increment the request counter
Trait Implementations
impl Debug for CorrelationId
[src]
impl Hash for CorrelationId
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for CorrelationId
[src]
fn clone(&self) -> CorrelationId
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Eq for CorrelationId
[src]
impl PartialEq for CorrelationId
[src]
fn eq(&self, __arg_0: &CorrelationId) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CorrelationId) -> bool
This method tests for !=
.