pub enum StatusCode {
Success,
Failure(ErrorStatusCode),
}
Expand description
A DHCPv6 status code as defined in RFC 8415, Section 21.13.
Variants§
Success
Failure(ErrorStatusCode)
Implementations§
Source§impl StatusCode
impl StatusCode
Sourcepub fn into_result(self) -> Result<(), ErrorStatusCode>
pub fn into_result(self) -> Result<(), ErrorStatusCode>
Converts into either Ok(())
if the status code is Success or an error
containing the failure status code.
Trait Implementations§
Source§impl Clone for StatusCode
impl Clone for StatusCode
Source§fn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StatusCode
impl Debug for StatusCode
Source§impl From<ErrorStatusCode> for StatusCode
impl From<ErrorStatusCode> for StatusCode
Source§fn from(code: ErrorStatusCode) -> Self
fn from(code: ErrorStatusCode) -> Self
Converts to this type from the input type.
Source§impl From<StatusCode> for u16
impl From<StatusCode> for u16
Source§fn from(t: StatusCode) -> u16
fn from(t: StatusCode) -> u16
Converts to this type from the input type.
Source§impl PartialEq for StatusCode
impl PartialEq for StatusCode
Source§impl TryFrom<u16> for StatusCode
impl TryFrom<u16> for StatusCode
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§fn try_from(b: u16) -> Result<StatusCode, ParseError>
fn try_from(b: u16) -> Result<StatusCode, ParseError>
Performs the conversion.
impl Copy for StatusCode
impl StructuralPartialEq for StatusCode
Auto Trait Implementations§
impl Freeze for StatusCode
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnwindSafe for StatusCode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)