Enum Field

Source
pub enum Field {
Show 15 variants U32(u32), U64(u64), I32(i32), I64(i64), F32(f32), F64(f64), Str(String), PidState(PidState), VecU32(Vec<u32>), StrSet(BTreeSet<String>), StrU64Map(BTreeMap<String, u64>), Cpuset(Cpuset), MemNodes(MemNodes), ResctrlCpuset(Cpuset), ResctrlGroupMode(GroupMode),
}
Expand description

A wrapper for different field types used in Models. By this way we can query different fields in a single function without using Box.

Variants§

§

U32(u32)

§

U64(u64)

§

I32(i32)

§

I64(i64)

§

F32(f32)

§

F64(f64)

§

Str(String)

§

PidState(PidState)

§

VecU32(Vec<u32>)

§

StrSet(BTreeSet<String>)

§

StrU64Map(BTreeMap<String, u64>)

§

Cpuset(Cpuset)

§

MemNodes(MemNodes)

§

ResctrlCpuset(Cpuset)

§

ResctrlGroupMode(GroupMode)

Trait Implementations§

Source§

impl Add for Field

Source§

type Output = Field

The resulting type after applying the + operator.
Source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
Source§

impl Clone for Field

Source§

fn clone(&self) -> Field

Returns a duplicate 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 Display for Field

Source§

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

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

impl<T: Into<Field> + Clone> From<&T> for Field

Source§

fn from(v: &T) -> Self

Converts to this type from the input type.
Source§

impl From<BTreeMap<String, u64>> for Field

Source§

fn from(v: BTreeMap<String, u64>) -> Self

Converts to this type from the input type.
Source§

impl From<BTreeSet<String>> for Field

Source§

fn from(v: BTreeSet<String>) -> Self

Converts to this type from the input type.
Source§

impl From<Cpuset> for Field

Source§

fn from(v: Cpuset) -> Self

Converts to this type from the input type.
Source§

impl From<Cpuset> for Field

Source§

fn from(v: Cpuset) -> Self

Converts to this type from the input type.
Source§

impl From<Field> for String

Source§

fn from(field: Field) -> String

Converts to this type from the input type.
Source§

impl From<Field> for f32

Source§

fn from(field: Field) -> f32

Converts to this type from the input type.
Source§

impl From<Field> for f64

Source§

fn from(field: Field) -> f64

Converts to this type from the input type.
Source§

impl From<Field> for i64

Source§

fn from(field: Field) -> i64

Converts to this type from the input type.
Source§

impl From<Field> for u64

Source§

fn from(field: Field) -> u64

Converts to this type from the input type.
Source§

impl From<GroupMode> for Field

Source§

fn from(v: GroupMode) -> Self

Converts to this type from the input type.
Source§

impl From<MemNodes> for Field

Source§

fn from(v: MemNodes) -> Self

Converts to this type from the input type.
Source§

impl From<PidState> for Field

Source§

fn from(v: PidState) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Field

Source§

fn from(v: String) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u32>> for Field

Source§

fn from(v: Vec<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for Field

Source§

fn from(v: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Field

Source§

fn from(v: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Field

Source§

fn from(v: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Field

Source§

fn from(v: i64) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Field

Source§

fn from(v: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for Field

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Field

Source§

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

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> With for T

Source§

fn wrap_with<U, F>(self, f: F) -> U
where F: FnOnce(Self) -> U,

Calls the given closure and return the result. Read more
Source§

fn with<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Calls the given closure on self.
Source§

fn try_with<E, F>(self, f: F) -> Result<Self, E>
where F: FnOnce(&mut Self) -> Result<(), E>,

Calls the given closure on self.
Source§

fn with_if<F>(self, condition: bool, f: F) -> Self
where F: FnOnce(&mut Self),

Calls the given closure if condition == true.
Source§

impl<T> Erased for T

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,