pub struct ResponseError { /* private fields */ }Expand description
HTTP 响应错误
Implementations§
Source§impl Error
impl Error
Sourcepub fn builder_with_msg(
kind: ErrorKind,
err: impl Display + Debug + Send + Sync + 'static,
) -> ErrorBuilder
pub fn builder_with_msg( kind: ErrorKind, err: impl Display + Debug + Send + Sync + 'static, ) -> ErrorBuilder
创建 HTTP 响应错误构建器
Sourcepub fn into_inner(self) -> AnyError
pub fn into_inner(self) -> AnyError
转换为内部存储的实际响应错误
Sourcepub fn server_port(&self) -> Option<NonZeroU16>
pub fn server_port(&self) -> Option<NonZeroU16>
获取服务器端口号
Sourcepub fn server_ip_mut(&mut self) -> &mut Option<IpAddr>
pub fn server_ip_mut(&mut self) -> &mut Option<IpAddr>
获取服务器 IP 地址的可变引用
Sourcepub fn server_port_mut(&mut self) -> &mut Option<NonZeroU16>
pub fn server_port_mut(&mut self) -> &mut Option<NonZeroU16>
获取服务器端口号的可变引用
Sourcepub fn metrics_mut(&mut self) -> &mut Option<Metrics>
pub fn metrics_mut(&mut self) -> &mut Option<Metrics>
获取响应指标信息的可变引用
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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