Skip to main content

DevEnum

Struct DevEnum 

Source
#[repr(transparent)]
pub struct DevEnum(pub i16);
Expand description

A value of an enumerated attribute: the index of its label among the labels of the attribute, see crate::dev::AttrConfig::enum_labels.

Tuple Fields§

§0: i16

Trait Implementations§

Source§

impl Clone for DevEnum

Source§

fn clone(&self) -> Self

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 DevEnum

Source§

impl Debug for DevEnum

Source§

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

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

impl Default for DevEnum

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Element for DevEnum

Source§

const INLINE_FIXED: bool

Whether a scalar of this type is held in place of a storage, which only a packed type small enough can be.
Source§

type Ref<'a> = DevEnum

How one value is given out: by value for a packed type, borrowed for a string.
Source§

type Spans = PackedSpans<DevEnum>

Where the values are in the storage.
Source§

fn validate(bytes: &[u8]) -> bool

Whether these octets are one valid value.
Source§

unsafe fn read<'a>(ptr: *const u8, _len: usize) -> DevEnum
where DevEnum: 'a,

The value in these octets. Read more
Source§

fn fmt_row<'a, I>(values: I, f: &mut Formatter<'_>) -> Result
where I: Iterator<Item = Self::Ref<'a>>, Self: 'a,

Format the values of one row of a buffer for Debug, along its first dimension, within the brackets of that row: separated by commas unless a type has a better way.
Source§

impl Eq for DevEnum

Source§

impl Hash for DevEnum

Source§

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

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PackedElement for DevEnum

Source§

fn validate_all(_bytes: &[u8]) -> bool

Whether the octets of a whole number of consecutive values are all valid values, in a single pass: what octets are checked with when they are cast, and what Element::validate is for one value.
Source§

impl PartialEq for DevEnum

Source§

fn eq(&self, other: &Self) -> 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 DevEnum

Source§

impl TangoElement for DevEnum

Source§

const ATTR_KIND: AttrDataKind = AttrDataKind::Enum

The kind of an attribute of such values.
Source§

const CMD_SCALAR_KIND: Option<CommandDataKind> = None

The kind of a command argument of one such value, absent if none can be.
Source§

const CMD_ARRAY_KIND: Option<CommandDataKind> = None

The kind of a command argument of an array of such values, absent if none can be.
Source§

fn wrap(format: ValueFormat<Self>) -> Value

Source§

fn unwrap(data: Value) -> Result<ValueFormat<Self>, Value>

Source§

fn unwrap_ref(data: &Value) -> Option<&ValueFormat<Self>>

Source§

impl TryFrom<&Value> for DevEnum

Source§

type Error = Error

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

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

Performs the conversion.
Source§

impl TryFrom<Value> for DevEnum

Source§

type Error = Error

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

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

Performs the conversion.

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> AttrData for T

Source§

const DATA_KIND: AttrDataKind = const DATA_KIND: AttrDataKind = <Buf<T, 0> as AttrData>::DATA_KIND;

Source§

const DATA_FORMAT: AttrDataFormat = const DATA_FORMAT: AttrDataFormat = <Buf<T, 0> as AttrData>::DATA_FORMAT;

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> CommandData for T

Source§

const DATA_KIND: CommandDataKind = const DATA_KIND: CommandDataKind = <Buf<T, 0> as CommandData>::DATA_KIND;

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromValue for T
where T: TryFrom<Value>, <T as TryFrom<Value>>::Error: Into<Error>,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoValue for T
where T: Into<Value>,

Source§

impl<T> Model for T
where T: Send + Sync + 'static,

Source§

impl<'name, T> ReadAttrSpec<&'name str> for T
where T: FromValue,

Source§

type Output = AttrRead<T>

The final type of the output.
Source§

fn collect( reads: Vec<Named<Result<AttrRead<Value>, Error>>>, ) -> Result<<T as ReadAttrSpec<&'name str>>::Output, Error>

Build the output out of the readings, one per attribute. Read more
Source§

impl<T> ReadAttrSpec<&Buf<str, 1>> for T
where T: FromValue,

Source§

type Output = Vec<Result<AttrRead<T>, Error>>

The final type of the output.
Source§

fn collect( reads: Vec<Named<Result<AttrRead<Value>, Error>>>, ) -> Result<<T as ReadAttrSpec<&Buf<str, 1>>>::Output, Error>

Build the output out of the readings, one per attribute. Read more
Source§

impl<'name, T> ReadAttrSpec<&[&'name str]> for T
where T: FromValue,

Source§

type Output = Vec<Result<AttrRead<T>, Error>>

The final type of the output.
Source§

fn collect( reads: Vec<Named<Result<AttrRead<Value>, Error>>>, ) -> Result<<T as ReadAttrSpec<&[&'name str]>>::Output, Error>

Build the output out of the readings, one per attribute. Read more
Source§

impl<T> ReadAttrSpec<All> for T
where T: FromValue,

Source§

type Output = Vec<Named<Result<AttrRead<T>, Error>>>

The final type of the output.
Source§

fn collect( reads: Vec<Named<Result<AttrRead<Value>, Error>>>, ) -> Result<<T as ReadAttrSpec<All>>::Output, Error>

Build the output out of the readings, one per attribute. Read more
Source§

impl<T> ReadAttrSpec<Buf<str, 1>> for T
where T: FromValue,

Source§

type Output = Vec<Result<AttrRead<T>, Error>>

The final type of the output.
Source§

fn collect( reads: Vec<Named<Result<AttrRead<Value>, Error>>>, ) -> Result<<T as ReadAttrSpec<Buf<str, 1>>>::Output, Error>

Build the output out of the readings, one per attribute. Read more
Source§

impl<'name, T, const N: usize> ReadAttrSpec<[&'name str; N]> for T
where T: FromValue,

Source§

type Output = [Result<AttrRead<T>, Error>; N]

The final type of the output.
Source§

fn collect( reads: Vec<Named<Result<AttrRead<Value>, Error>>>, ) -> Result<<T as ReadAttrSpec<[&'name str; N]>>::Output, Error>

Build the output out of the readings, one per attribute. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more