Enum Field

Source
#[non_exhaustive]
#[repr(u32)]
pub enum Field { Any = 0, None = 1, Top = 2, Bottom = 3, Interlaced = 4, SequentialTb = 5, SequentialBt = 6, Alternate = 7, InterlacedTb = 8, InterlacedBt = 9, }

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.
§

Any = 0

Driver can choose from none, top, bottom, interlaced depending on whatever it thinks is approximate

§

None = 1

This device has no fields

§

Top = 2

Top field only

§

Bottom = 3

Bottom field only

§

Interlaced = 4

Both fields interlaced

§

SequentialTb = 5

Both fields sequential into one buffer, top-bottom order

§

SequentialBt = 6

Same as above + bottom-top order

§

Alternate = 7

Both fields alternating into separate buffers

§

InterlacedTb = 8

Both fields interlaced, top field first and the top field is transmitted first

§

InterlacedBt = 9

Both fields interlaced, top field first and the bottom field is transmitted first

Implementations§

Source§

impl Field

Source

pub fn has_top(&self) -> bool

Source

pub fn has_bottom(&self) -> bool

Source

pub fn has_both(&self) -> bool

Source

pub fn has_t_or_b(&self) -> bool

Source

pub fn is_interlaced(&self) -> bool

Source

pub fn is_sequential(&self) -> bool

Methods from Deref<Target = u32>§

1.43.0 · Source

pub const MIN: u32 = 0u32

1.43.0 · Source

pub const MAX: u32 = 4_294_967_295u32

1.53.0 · Source

pub const BITS: u32 = 32u32

Trait Implementations§

Source§

impl AsRef<u32> for Field

Source§

fn as_ref(&self) -> &u32

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for Field

Source§

fn clone(&self) -> Field

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Field

Source§

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

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

impl Deref for Field

Source§

type Target = u32

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Display for Field

Source§

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

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

impl From<Field> for u32

Source§

fn from(data: Field) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Field

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u32> for Field

Source§

type Error = u32

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

fn try_from(data: u32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for Field

Source§

impl Eq for Field

Source§

impl StructuralPartialEq for Field

Auto Trait Implementations§

§

impl Freeze for Field

§

impl RefUnwindSafe for Field

§

impl Send for Field

§

impl Sync for Field

§

impl Unpin for Field

§

impl UnwindSafe for Field

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.