Skip to main content

BaudRate

Struct BaudRate 

Source
pub struct BaudRate(/* private fields */);
Expand description

Vitesse de transmission (valeur encodée CBAUD/CBAUDEX de c_cflag).

Couvre les vitesses POSIX standard. La conversion bidirectionnelle préserve l’octet de vitesse ; une valeur kernel inconnue est rendue telle quelle via BaudRate::from_code/BaudRate::code (pas de perte d’information — doctrine « kernel = bible »).

Implementations§

Source§

impl BaudRate

Source

pub const B0: Self

B0 — débit nul (raccroche).

Source

pub const B50: Self

B50.

Source

pub const B75: Self

B75.

Source

pub const B110: Self

B110.

Source

pub const B134: Self

B134.

Source

pub const B150: Self

B150.

Source

pub const B200: Self

B200.

Source

pub const B300: Self

B300.

Source

pub const B600: Self

B600.

Source

pub const B1200: Self

B1200.

Source

pub const B1800: Self

B1800.

Source

pub const B2400: Self

B2400.

Source

pub const B4800: Self

B4800.

Source

pub const B9600: Self

B9600.

Source

pub const B19200: Self

B19200.

Source

pub const B38400: Self

B38400.

Source

pub const B57600: Self

B57600.

Source

pub const B115200: Self

B115200.

Source

pub const B230400: Self

B230400.

Source

pub const B460800: Self

B460800.

Source

pub const B921600: Self

B921600.

Source

pub const fn from_code(code: u32) -> Self

Construit depuis le code de vitesse brut (octet CBAUD|CBAUDEX).

Source

pub const fn code(self) -> u32

Code de vitesse brut (octet CBAUD|CBAUDEX), pour réinjection dans c_cflag.

Trait Implementations§

Source§

impl Clone for BaudRate

Source§

fn clone(&self) -> BaudRate

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BaudRate

Source§

impl Debug for BaudRate

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for BaudRate

Source§

impl PartialEq for BaudRate

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BaudRate

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.