Struct openraft::error::RemoteError
source · pub struct RemoteError<NID: NodeId, N: Node, T: Error> {
pub target: NID,
pub target_node: Option<N>,
pub source: T,
}
Fields§
§target: NID
§target_node: Option<N>
§source: T
Implementations§
source§impl<NID: NodeId, N: Node, T: Error> RemoteError<NID, N, T>
impl<NID: NodeId, N: Node, T: Error> RemoteError<NID, N, T>
pub fn new(target: NID, e: T) -> Self
pub fn new_with_node(target: NID, node: N, e: T) -> Self
Trait Implementations§
source§impl<NID: Clone + NodeId, N: Clone + Node, T: Clone + Error> Clone for RemoteError<NID, N, T>
impl<NID: Clone + NodeId, N: Clone + Node, T: Clone + Error> Clone for RemoteError<NID, N, T>
source§fn clone(&self) -> RemoteError<NID, N, T>
fn clone(&self) -> RemoteError<NID, N, T>
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<NID: Debug + NodeId, N: Debug + Node, T: Debug + Error> Debug for RemoteError<NID, N, T>
impl<NID: Debug + NodeId, N: Debug + Node, T: Debug + Error> Debug for RemoteError<NID, N, T>
source§impl<'de, NID: NodeId, N: Node, T> Deserialize<'de> for RemoteError<NID, N, T>where
T: Deserialize<'de> + Error,
impl<'de, NID: NodeId, N: Node, T> Deserialize<'de> for RemoteError<NID, N, T>where
T: Deserialize<'de> + Error,
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<NID, N: Node, T> Display for RemoteError<NID, N, T>
impl<NID, N: Node, T> Display for RemoteError<NID, N, T>
source§impl<NID: NodeId, N: Node, T> Error for RemoteError<NID, N, T>
impl<NID: NodeId, N: Node, T> Error for RemoteError<NID, N, T>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<C: RaftTypeConfig, E: Error> From<RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>> for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> From<RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>> for StreamingError<C, E>
source§impl<NID: NodeId, N: Node, E: Error> From<RemoteError<NID, N, E>> for RPCError<NID, N, E>
impl<NID: NodeId, N: Node, E: Error> From<RemoteError<NID, N, E>> for RPCError<NID, N, E>
source§fn from(source: RemoteError<NID, N, E>) -> Self
fn from(source: RemoteError<NID, N, E>) -> Self
Converts to this type from the input type.
source§impl<NID, N, E> From<RemoteError<NID, N, Fatal<NID>>> for RemoteError<NID, N, RaftError<NID, E>>
impl<NID, N, E> From<RemoteError<NID, N, Fatal<NID>>> for RemoteError<NID, N, RaftError<NID, E>>
source§fn from(e: RemoteError<NID, N, Fatal<NID>>) -> Self
fn from(e: RemoteError<NID, N, Fatal<NID>>) -> Self
Converts to this type from the input type.
source§impl<NID: PartialEq + NodeId, N: PartialEq + Node, T: PartialEq + Error> PartialEq for RemoteError<NID, N, T>
impl<NID: PartialEq + NodeId, N: PartialEq + Node, T: PartialEq + Error> PartialEq for RemoteError<NID, N, T>
source§fn eq(&self, other: &RemoteError<NID, N, T>) -> bool
fn eq(&self, other: &RemoteError<NID, N, T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<NID: Eq + NodeId, N: Eq + Node, T: Eq + Error> Eq for RemoteError<NID, N, T>
impl<NID: NodeId, N: Node, T: Error> StructuralPartialEq for RemoteError<NID, N, T>
Auto Trait Implementations§
impl<NID, N, T> Freeze for RemoteError<NID, N, T>
impl<NID, N, T> RefUnwindSafe for RemoteError<NID, N, T>
impl<NID, N, T> Send for RemoteError<NID, N, T>where
T: Send,
impl<NID, N, T> Sync for RemoteError<NID, N, T>where
T: Sync,
impl<NID, N, T> Unpin for RemoteError<NID, N, T>
impl<NID, N, T> UnwindSafe for RemoteError<NID, N, T>
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