pub enum ExampleRequest {
Set {
key: String,
value: String,
},
}
Expand description
Here you will set the types of request that will interact with the raft nodes.
For example the Set
will be used to write data (key and value) to the raft database.
The AddNode
will append a new node to the current existing shared list of nodes.
You will want to add any request that can write data in all nodes here.
Variants§
Trait Implementations§
source§impl Clone for ExampleRequest
impl Clone for ExampleRequest
source§fn clone(&self) -> ExampleRequest
fn clone(&self) -> ExampleRequest
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 ExampleRequest
impl Debug for ExampleRequest
source§impl<'de> Deserialize<'de> for ExampleRequest
impl<'de> Deserialize<'de> for ExampleRequest
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
Auto Trait Implementations§
impl Freeze for ExampleRequest
impl RefUnwindSafe for ExampleRequest
impl Send for ExampleRequest
impl Sync for ExampleRequest
impl Unpin for ExampleRequest
impl UnwindSafe for ExampleRequest
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