[−][src]Enum rant::RantVar
Represents a Rant variable of one of two flavors: by-value or by-reference.
Cloning
The Clone
implementation for this type does not copy any data in ByRef*
variants; it only copies the reference.
Variants
ByVal(RantValue)
ByValConst(RantValue)
Implementations
impl RantVar
[src]
pub fn is_const(&self) -> bool
[src]
Returns true
if the variable is a constant.
pub fn is_by_val(&self) -> bool
[src]
Returns true
if the variable is by-value.
pub fn is_by_ref(&self) -> bool
[src]
Returns true
if the variable is by-reference.
pub fn make_by_ref(&mut self)
[src]
Converts the variable to its by-reference counterpart.
pub fn write(&mut self, value: RantValue) -> bool
[src]
Attempts to write the specified value to the variable.
If the variable is a constant, returns false
; otherwise, returns true
.
pub fn value_ref(&self) -> impl Deref<Target = RantValue> + '_
[src]
Returns an immutable reference to the contained value.
pub fn value_cloned(&self) -> RantValue
[src]
Returns a copy of the variable value.
Trait Implementations
impl Clone for RantVar
[src]
pub fn clone(&self) -> Self
[src]
Creates a copy of the variable, preserving references.
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RantVar
[src]
impl Default for RantVar
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RantVar
[src]
impl !Send for RantVar
[src]
impl !Sync for RantVar
[src]
impl Unpin for RantVar
[src]
impl !UnwindSafe for RantVar
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,