[−][src]Struct rate_common::literal::Variable
A variable, encoded as 32 bit unsigned integer.
Methods
impl Variable
[src]
pub fn new(value: u32) -> Variable
[src]
pub fn literal(self) -> Literal
[src]
Convert a variable to a positive literal.
pub fn array_size_for_variables(self) -> usize
[src]
The size of an array that can contain variables up to and including
self
.
pub fn array_size_for_literals(self) -> usize
[src]
The size of an array that can contain literals up to and including
-self.literal()
.
Trait Implementations
impl Offset for Variable
[src]
Enable as array index.
fn as_offset(&self) -> usize
[src]
We simply use the variable index, so offset 0 will be generally unused.
impl Clone for Variable
[src]
impl Copy for Variable
[src]
impl Eq for Variable
[src]
impl Ord for Variable
[src]
fn cmp(&self, other: &Variable) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Variable> for Variable
[src]
impl PartialOrd<Variable> for Variable
[src]
fn partial_cmp(&self, other: &Variable) -> Option<Ordering>
[src]
fn lt(&self, other: &Variable) -> bool
[src]
fn le(&self, other: &Variable) -> bool
[src]
fn gt(&self, other: &Variable) -> bool
[src]
fn ge(&self, other: &Variable) -> bool
[src]
impl Display for Variable
[src]
impl Debug for Variable
[src]
Auto Trait Implementations
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
impl RefUnwindSafe for Variable
Blanket Implementations
impl<T> HeapSpace for T where
T: Copy,
[src]
T: Copy,
fn heap_space(&Self) -> usize
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,