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<NID, N: Node, T> Display for RemoteError<NID, N, T>where
NID: Display + NodeId,
T: Display + Error,
impl<NID, N: Node, T> Display for RemoteError<NID, N, T>where NID: Display + NodeId, T: Display + Error,
source§impl<NID: NodeId, N: Node, T> Error for RemoteError<NID, N, T>where
T: Error + 'static,
Self: Debug + Display,
impl<NID: NodeId, N: Node, T> Error for RemoteError<NID, N, T>where T: Error + 'static, Self: Debug + Display,
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<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: PartialEq + NodeId, N: PartialEq + Node, T: PartialEq + Error> PartialEq<RemoteError<NID, N, T>> for RemoteError<NID, N, T>
impl<NID: PartialEq + NodeId, N: PartialEq + Node, T: PartialEq + Error> PartialEq<RemoteError<NID, N, T>> 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> StructuralEq 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> RefUnwindSafe for RemoteError<NID, N, T>where N: RefUnwindSafe, NID: RefUnwindSafe, T: RefUnwindSafe,
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>where N: Unpin, NID: Unpin, T: Unpin,
impl<NID, N, T> UnwindSafe for RemoteError<NID, N, T>where N: UnwindSafe, NID: UnwindSafe, T: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.