pub struct HeaderError { /* private fields */ }Available on crate feature
p2 only.Expand description
A wasi:http-specific error type used to represent either a trap or an
types::HeaderError.
Modeled after TrappableError.
Implementations§
Source§impl HeaderError
impl HeaderError
Sourcepub fn trap(err: impl Into<Error>) -> HeaderError
pub fn trap(err: impl Into<Error>) -> HeaderError
Create a new HeaderError that represents a trap.
Sourcepub fn downcast(self) -> Result<HeaderError>
pub fn downcast(self) -> Result<HeaderError>
Downcast this error to an ErrorCode.
Sourcepub fn downcast_ref(&self) -> Option<&HeaderError>
pub fn downcast_ref(&self) -> Option<&HeaderError>
Downcast this error to a reference to an ErrorCode
Trait Implementations§
Source§impl Debug for HeaderError
impl Debug for HeaderError
Source§impl Display for HeaderError
impl Display for HeaderError
Source§impl From<FieldMapError> for HeaderError
impl From<FieldMapError> for HeaderError
Source§fn from(err: FieldMapError) -> Self
fn from(err: FieldMapError) -> Self
Converts to this type from the input type.
Source§impl From<HeaderError> for HeaderError
impl From<HeaderError> for HeaderError
Source§fn from(error: HeaderError) -> Self
fn from(error: HeaderError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderName> for HeaderError
impl From<InvalidHeaderName> for HeaderError
Source§impl From<InvalidHeaderValue> for HeaderError
impl From<InvalidHeaderValue> for HeaderError
Source§impl From<ResourceTableError> for HeaderError
impl From<ResourceTableError> for HeaderError
Source§fn from(error: ResourceTableError) -> Self
fn from(error: ResourceTableError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HeaderError
impl RefUnwindSafe for HeaderError
impl Send for HeaderError
impl Sync for HeaderError
impl Unpin for HeaderError
impl UnwindSafe for HeaderError
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
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more