pub enum ExtendedLineMethodVariant {
Variant1,
Variant2,
Variant3,
}Variants§
Trait Implementations§
Source§impl Debug for ExtendedLineMethodVariant
impl Debug for ExtendedLineMethodVariant
Source§impl TryFrom<u8> for ExtendedLineMethodVariant
impl TryFrom<u8> for ExtendedLineMethodVariant
Source§fn try_from(value: u8) -> Result<Self, Self::Error>
fn try_from(value: u8) -> Result<Self, Self::Error>
Coverts a value to Extended Line method variant enum.
§Examples
§Convert number to variant
use ptero::method::complex::extended_line::ExtendedLineMethodVariant;
use std::convert::TryFrom;
assert_eq!(ExtendedLineMethodVariant::try_from(1).unwrap(), ExtendedLineMethodVariant::Variant1);
assert_eq!(ExtendedLineMethodVariant::try_from(2).unwrap(), ExtendedLineMethodVariant::Variant2);
assert_eq!(ExtendedLineMethodVariant::try_from(3).unwrap(), ExtendedLineMethodVariant::Variant3);§Returns error if invalid number
ⓘ
use ptero::method::complex::extended_line::ExtendedLineMethodVariant;
use ptero::method::variant::VariantError;
use std::convert::TryFrom;
ExtendedLineMethodVariant::try_from(4).unwrap();Source§type Error = VariantError
type Error = VariantError
The type returned in the event of a conversion error.
impl StructuralPartialEq for ExtendedLineMethodVariant
Auto Trait Implementations§
impl Freeze for ExtendedLineMethodVariant
impl RefUnwindSafe for ExtendedLineMethodVariant
impl Send for ExtendedLineMethodVariant
impl Sync for ExtendedLineMethodVariant
impl Unpin for ExtendedLineMethodVariant
impl UnwindSafe for ExtendedLineMethodVariant
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