Enum BaudRate

#[repr(u32)]
#[non_exhaustive]
pub enum BaudRate

Baud rates supported by the system.

For the BSDs, arbitrary baud rates can be specified by using u32s directly instead of this enum.

B0 is special and will disable the port.

Variants

B0 = libc::B0
B50 = libc::B50
B75 = libc::B75
B110 = libc::B110
B134 = libc::B134
B150 = libc::B150
B200 = libc::B200
B300 = libc::B300
B600 = libc::B600
B1200 = libc::B1200
B1800 = libc::B1800
B2400 = libc::B2400
B4800 = libc::B4800
B9600 = libc::B9600
B19200 = libc::B19200
B38400 = libc::B38400
B57600 = libc::B57600
B115200 = libc::B115200
B230400 = libc::B230400
B460800 = libc::B460800
B500000 = libc::B500000
B576000 = libc::B576000
B921600 = libc::B921600
B1000000 = libc::B1000000
B1152000 = libc::B1152000
B1500000 = libc::B1500000
B2000000 = libc::B2000000
B2500000 = libc::B2500000
B3000000 = libc::B3000000
B3500000 = libc::B3500000
B4000000 = libc::B4000000

Trait Implementations

impl Clone for BaudRate

fn clone(&self) -> Self

impl Copy for BaudRate

impl Debug for BaudRate

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for BaudRate

impl Hash for BaudRate

fn hash<__H: Hasher>(&self, state: &mut __H)

impl Ord for BaudRate

fn cmp(&self, other: &Self) -> Ordering

impl PartialEq for BaudRate

fn eq(&self, other: &Self) -> bool

impl PartialOrd for BaudRate

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

impl StructuralPartialEq for BaudRate

impl TryFrom<u32> for BaudRate

type Error = Errno;
fn try_from(x: speed_t) -> Result<Self>

Auto Trait Implementations

impl Freeze for BaudRate

impl RefUnwindSafe for BaudRate

impl Send for BaudRate

impl Sync for BaudRate

impl Unpin for BaudRate

impl UnsafeUnpin for BaudRate

impl UnwindSafe for BaudRate

Blanket Implementations

impl<T> Any for BaudRate where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for BaudRate where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for BaudRate where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for BaudRate where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for BaudRate

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for BaudRate where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for BaudRate where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for BaudRate where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for BaudRate where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>