#[non_exhaustive]pub enum PortmapError {
Rpc(RpcError),
ProgramUnavailable,
InvalidPortValue(u32),
}Expand description
Error from portmapper operations.
Returned by PortmapperClient::getport.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Rpc(RpcError)
The RPC call failed.
The requested program is not registered with the portmapper.
InvalidPortValue(u32)
The portmapper returned a port number that does not fit in a u16.
Implementations§
Source§impl PortmapError
impl PortmapError
Sourcepub const fn is_connection_reusable(&self) -> bool
pub const fn is_connection_reusable(&self) -> bool
Returns true if the connection that produced this error is still in
a clean state and may be reused.
Trait Implementations§
Source§impl Debug for PortmapError
impl Debug for PortmapError
Source§impl Display for PortmapError
impl Display for PortmapError
Source§impl Error for PortmapError
impl Error for PortmapError
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 !RefUnwindSafe for PortmapError
impl !UnwindSafe for PortmapError
impl Forget for PortmapError
impl Freeze for PortmapError
impl Send for PortmapError
impl Sync for PortmapError
impl Unpin for PortmapError
impl UnsafeUnpin for PortmapError
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