Struct http_srv::server::error::ServerError
source · pub struct ServerError(/* private fields */);
Expand description
Server Error
Implementations§
source§impl ServerError
impl ServerError
sourcepub fn from_str(msg: &'static str) -> Self
pub fn from_str(msg: &'static str) -> Self
Creates a ServerError from a &’static str
sourcepub fn from_string(msg: String) -> Self
pub fn from_string(msg: String) -> Self
Creates a ServerError from a String
sourcepub fn err<T>(self) -> Result<T, Self>
pub fn err<T>(self) -> Result<T, Self>
Turns the ServerError into a Result<T,ServerError>
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)>
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