pub enum TransactionMessage {
TransactionOperation(WrappedServerMessage),
Register(Sender<TransactionMessage>),
Ping((usize, String)),
Deregister(usize),
CloseConnection,
Registered(usize),
Unregistered,
Error(NanoServiceError),
}
Expand description
The message that is to be sent between actors on the same machine.
§Fields
TransactionOperation
: a transaction operation that is to be sent to the key value store and thus over a TCP connectionRegister
: a message to register a transaction actor with the routerPing
: a message to ping the connection to ensure it is still alive (router ID, connection ID)Deregister
: a message to deregister a transaction actor from the routerCloseConnection
: a message to close the connectionRegistered
: a message to confirm that a transaction actor has been registeredUnregistered
: a message to confirm that a transaction actor has been deregisteredError
: a message to send an error to the client
Variants§
TransactionOperation(WrappedServerMessage)
Register(Sender<TransactionMessage>)
Ping((usize, String))
Deregister(usize)
CloseConnection
Registered(usize)
Unregistered
Error(NanoServiceError)
Implementations§
source§impl TransactionMessage
impl TransactionMessage
sourcepub fn extract_transaction_operation(
self,
) -> Result<(usize, ServerTransactionMessage), NanoServiceError>
pub fn extract_transaction_operation( self, ) -> Result<(usize, ServerTransactionMessage), NanoServiceError>
Extracts the transaction operation and server ID.
§Returns
A tuple containing the server ID and the transaction operation.
Trait Implementations§
source§impl Clone for TransactionMessage
impl Clone for TransactionMessage
source§fn clone(&self) -> TransactionMessage
fn clone(&self) -> TransactionMessage
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 moreAuto Trait Implementations§
impl Freeze for TransactionMessage
impl RefUnwindSafe for TransactionMessage
impl Send for TransactionMessage
impl Sync for TransactionMessage
impl Unpin for TransactionMessage
impl UnwindSafe for TransactionMessage
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
)