Struct lock_keeper::types::operations::RequestMetadata
source · pub struct RequestMetadata {
account_name: AccountName,
action: ClientAction,
session_id: Option<Uuid>,
request_id: Uuid,
}
Expand description
Metadata attached to each request to the server. Note that the request ID is
an ID for an entire operation, not each ClientAction
that the operation is
composed of.
Fields§
§account_name: AccountName
§action: ClientAction
§session_id: Option<Uuid>
§request_id: Uuid
Implementations§
source§impl RequestMetadata
impl RequestMetadata
pub fn new( account_name: &AccountName, action: ClientAction, session_id: Option<&Uuid>, request_id: Uuid ) -> Self
pub fn account_name(&self) -> &AccountName
pub fn action(&self) -> ClientAction
pub fn request_id(&self) -> Uuid
pub fn session_id(&self) -> Option<&Uuid>
Trait Implementations§
source§impl Clone for RequestMetadata
impl Clone for RequestMetadata
source§fn clone(&self) -> RequestMetadata
fn clone(&self) -> RequestMetadata
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 RequestMetadata
impl Debug for RequestMetadata
source§impl<'de> Deserialize<'de> for RequestMetadata
impl<'de> Deserialize<'de> for RequestMetadata
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 Serialize for RequestMetadata
impl Serialize for RequestMetadata
source§impl TryFrom<&MetadataValue<Ascii>> for RequestMetadata
impl TryFrom<&MetadataValue<Ascii>> for RequestMetadata
§type Error = LockKeeperError
type Error = LockKeeperError
The type returned in the event of a conversion error.
source§impl TryFrom<&RequestMetadata> for MetadataValue<Ascii>
impl TryFrom<&RequestMetadata> for MetadataValue<Ascii>
§type Error = LockKeeperError
type Error = LockKeeperError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for RequestMetadata
impl RefUnwindSafe for RequestMetadata
impl Send for RequestMetadata
impl Sync for RequestMetadata
impl Unpin for RequestMetadata
impl UnwindSafe for RequestMetadata
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
source§impl<T> ConvertMessage for Twhere
T: for<'a> Deserialize<'a> + Serialize,
impl<T> ConvertMessage for Twhere
T: for<'a> Deserialize<'a> + Serialize,
fn from_message(value: Message) -> Result<Self, LockKeeperError>
fn to_message(self) -> Result<Message, LockKeeperError>
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>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request