pub struct WrappedServerMessage {
pub client_id: usize,
pub server_id: Option<usize>,
pub connection_id: String,
pub transaction_id: Option<String>,
pub message: ServerMessage,
}
Expand description
A server message wrapped in meta data around the message so the key value data can be processed and returned by the server.
§Fields
client_id
: the client ID for the allocator in the client to route back to the transacrtion actor in the clientserver_id
: the server ID for the allocator in the server to route back to the transaction actor in the serverconnection_id
: the connection ID for the connection that the message is being sent over (for logging)transaction_id
: the transaction ID for the transaction that the message is being sent over (for logging)message
: the server message to be sent between the client and the server that contains all data to perform a key value operation. this will also contain the response from the key value operation
Fields§
§client_id: usize
§server_id: Option<usize>
§connection_id: String
§transaction_id: Option<String>
§message: ServerMessage
Implementations§
source§impl WrappedServerMessage
impl WrappedServerMessage
sourcepub fn new(
client_id: usize,
message: ServerMessage,
connection_id: String,
) -> Self
pub fn new( client_id: usize, message: ServerMessage, connection_id: String, ) -> Self
The constructor for the WrappedServerMessage
.
§Arguments
client_id
: the client ID for the allocator in the client to route back to the transacrtion actor in the clientmessage
: the server message to be sent between the client and the server that contains all data to perform a key value operation. this will also contain the response from the key value operationconnection_id
: the connection ID for the connection that the message is being sent over (for logging)
§Returns
WrappedServerMessage
: the wrapped server message
sourcepub fn transaction_id(self, transaction_id: String) -> Self
pub fn transaction_id(self, transaction_id: String) -> Self
Trait Implementations§
source§impl Clone for WrappedServerMessage
impl Clone for WrappedServerMessage
source§fn clone(&self) -> WrappedServerMessage
fn clone(&self) -> WrappedServerMessage
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 WrappedServerMessage
impl Debug for WrappedServerMessage
source§impl<'de> Deserialize<'de> for WrappedServerMessage
impl<'de> Deserialize<'de> for WrappedServerMessage
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 PartialEq for WrappedServerMessage
impl PartialEq for WrappedServerMessage
source§impl Revisioned for WrappedServerMessage
impl Revisioned for WrappedServerMessage
source§impl Serialize for WrappedServerMessage
impl Serialize for WrappedServerMessage
impl StructuralPartialEq for WrappedServerMessage
Auto Trait Implementations§
impl Freeze for WrappedServerMessage
impl RefUnwindSafe for WrappedServerMessage
impl Send for WrappedServerMessage
impl Sync for WrappedServerMessage
impl Unpin for WrappedServerMessage
impl UnwindSafe for WrappedServerMessage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)