pub struct ServiceError { /* private fields */ }Expand description
Stable, displayable failure payload carried by ServiceOutcome::Error.
Implementations§
Source§impl ServiceError
impl ServiceError
Sourcepub fn new(message: impl Into<String>) -> Self
pub fn new(message: impl Into<String>) -> Self
Builds a new service error from a message that should remain meaningful at supervisor boundaries and in summaries.
Sourcepub fn from_error(error: impl Error) -> Self
pub fn from_error(error: impl Error) -> Self
Converts an external error into a stable ServiceError message.
pub fn message(&self) -> &str
Trait Implementations§
Source§impl Clone for ServiceError
impl Clone for ServiceError
Source§fn clone(&self) -> ServiceError
fn clone(&self) -> ServiceError
Returns a duplicate 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 ServiceError
impl Debug for ServiceError
Source§impl Display for ServiceError
impl Display for ServiceError
Source§impl From<&str> for ServiceError
impl From<&str> for ServiceError
Source§impl From<String> for ServiceError
impl From<String> for ServiceError
Source§impl IntoServiceError for ServiceError
impl IntoServiceError for ServiceError
Source§fn into_service_error(self) -> ServiceError
fn into_service_error(self) -> ServiceError
Converts
self into the stable service error payload used in summaries.Source§impl PartialEq for ServiceError
impl PartialEq for ServiceError
impl Eq for ServiceError
impl StructuralPartialEq for ServiceError
Auto Trait Implementations§
impl Freeze for ServiceError
impl RefUnwindSafe for ServiceError
impl Send for ServiceError
impl Sync for ServiceError
impl Unpin for ServiceError
impl UnsafeUnpin for ServiceError
impl UnwindSafe for ServiceError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSupervisorState<S> for Swhere
S: Clone,
impl<S> FromSupervisorState<S> for Swhere
S: Clone,
Source§fn from_state(state: &S) -> S
fn from_state(state: &S) -> S
Projects
Self out of the root supervisor state.