[−][src]Struct actix_raft::messages::ClientPayload
A payload with an entry coming from a client request.
The entries of this payload will be appended to the Raft log and then applied to the Raft state machine according to the Raft protocol.
actix::Message
Applications using this Raft implementation are responsible for implementing the
networking/transport layer which must move RPCs between nodes. Once the application instance
recieves a Raft RPC, it must send the RPC to the Raft node via its actix::Addr
and then
return the response to the original sender.
The result type of calling the Raft actor with this message type is
Result<ClientPayloadResponse, StorageError>
. Applications built around this implementation of
Raft will often need to perform their own custom logic in the storage layer and often times it
is critical to be able to surface such errors to the application and its clients. To meet that
end, ClientError
allows for the communication of application specific errors.
Methods
impl<D: AppData, R: AppDataResponse, E: AppError> ClientPayload<D, R, E>
[src]
pub fn new(entry: EntryNormal<D>, response_mode: ResponseMode) -> Self
[src]
Create a new client payload instance with a normal entry type.
Trait Implementations
impl<D: Debug + AppData, R: Debug + AppDataResponse, E: Debug + AppError> Debug for ClientPayload<D, R, E>
[src]
impl<'de, D: AppData, R: AppDataResponse, E: AppError> Deserialize<'de> for ClientPayload<D, R, E> where
D: AppData,
[src]
D: AppData,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<D: AppData, R: AppDataResponse, E: AppError, N: RaftNetwork<D>, S: RaftStorage<D, R, E>> Handler<ClientPayload<D, R, E>> for Raft<D, R, E, N, S>
[src]
type Result = ResponseActFuture<Self, ClientPayloadResponse<R>, ClientError<D, R, E>>
The type of value that this handler will return.
fn handle(
&mut self,
msg: ClientPayload<D, R, E>,
_: &mut Self::Context
) -> Self::Result
[src]
&mut self,
msg: ClientPayload<D, R, E>,
_: &mut Self::Context
) -> Self::Result
Handle client requests.
impl<D: AppData, R: AppDataResponse, E: AppError> Message for ClientPayload<D, R, E>
[src]
type Result = Result<ClientPayloadResponse<R>, ClientError<D, R, E>>
The result type of this message.
impl<D: AppData, R: AppDataResponse, E: AppError> Serialize for ClientPayload<D, R, E> where
D: AppData,
[src]
D: AppData,
Auto Trait Implementations
impl<D, R, E> RefUnwindSafe for ClientPayload<D, R, E> where
D: RefUnwindSafe,
E: RefUnwindSafe,
R: RefUnwindSafe,
D: RefUnwindSafe,
E: RefUnwindSafe,
R: RefUnwindSafe,
impl<D, R, E> Send for ClientPayload<D, R, E>
impl<D, R, E> Sync for ClientPayload<D, R, E>
impl<D, R, E> Unpin for ClientPayload<D, R, E> where
D: Unpin,
E: Unpin,
R: Unpin,
D: Unpin,
E: Unpin,
R: Unpin,
impl<D, R, E> UnwindSafe for ClientPayload<D, R, E> where
D: UnwindSafe,
E: UnwindSafe,
R: UnwindSafe,
D: UnwindSafe,
E: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,