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§fn from(_: InvalidHeaderName) -> Self
fn from(_: InvalidHeaderName) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for HeaderError
impl From<InvalidHeaderValue> for HeaderError
Source§fn from(_: InvalidHeaderValue) -> Self
fn from(_: InvalidHeaderValue) -> Self
Converts to this type from the input type.
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 UnsafeUnpin 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
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§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.Source§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,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read more