pub enum ServerError {
Transport(Error),
Consensus(ConsensusError),
Core(CoreError),
WatchPanic {
payload: String,
bt: Bt,
},
WatchStreamClosed,
}Variants§
Transport(Error)
Consensus(ConsensusError)
Core(CoreError)
WatchPanic
The leader-watch task panicked. Distinct from a clean error return so operators can tell “driver returned Err” (recoverable design) from “task panicked” (programming bug).
WatchStreamClosed
The consensus driver’s leadership_events() stream ended cleanly while
the leader-watch task was running. The stream is contracted to live for
the life of the server, so its end is anomalous (driver shutdown, lost
session, etc.) — distinct from a Consensus error returned mid-fence.
The watch task publishes ServingState::NotServing before returning
this variant so embedders who never observe the JoinHandle still get
the documented fail-safe behavior.
Trait Implementations§
Source§impl Debug for ServerError
impl Debug for ServerError
Source§impl Display for ServerError
impl Display for ServerError
Source§impl Error for ServerError
impl Error for ServerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 From<ConsensusError> for ServerError
impl From<ConsensusError> for ServerError
Source§fn from(source: ConsensusError) -> Self
fn from(source: ConsensusError) -> Self
Converts to this type from the input type.
Source§impl From<CoreError> for ServerError
impl From<CoreError> for ServerError
Auto Trait Implementations§
impl Freeze for ServerError
impl !RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnsafeUnpin for ServerError
impl !UnwindSafe for ServerError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request