pub struct ServerError(/* private fields */);
Expand description
Server Error
Implementations§
Source§impl ServerError
impl ServerError
Sourcepub fn new(msg: impl Into<Cow<'static, str>>) -> Self
pub fn new(msg: impl Into<Cow<'static, str>>) -> Self
Creates a ServerError
from a &’static str
Sourcepub fn err<T>(self) -> Result<T, Self>
pub fn err<T>(self) -> Result<T, Self>
Turns the ServerError
into a Result<TServerError
or]>
Sourcepub fn get_message(&self) -> &str
pub fn get_message(&self) -> &str
Gets the message inside the ServerError
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
1.30.0 · 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<&'static str> for ServerError
impl From<&'static str> for ServerError
Source§impl From<Error> for ServerError
impl From<Error> for ServerError
Source§impl From<FromUtf8Error> for ServerError
impl From<FromUtf8Error> for ServerError
Source§fn from(value: FromUtf8Error) -> Self
fn from(value: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for ServerError
impl From<ParseIntError> for ServerError
Source§fn from(value: ParseIntError) -> Self
fn from(value: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<String> for ServerError
impl From<String> for ServerError
Source§impl From<StripPrefixError> for ServerError
impl From<StripPrefixError> for ServerError
Source§fn from(value: StripPrefixError) -> Self
fn from(value: StripPrefixError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ServerError
impl RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin 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