pub enum ConstantDirective<V = Value> {
Str(String),
Function(String),
Value(V),
}Expand description
The value of a .const directive.
Variants§
Str(String)
.const str "text": a string constant, interned in the string table.
Function(String)
.const fn @name: a reference to the function declared by
.func @name.
Value(V)
.const <value> in the value type’s own syntax, such as u64 42.
Trait Implementations§
Source§impl<V: Clone> Clone for ConstantDirective<V>
impl<V: Clone> Clone for ConstantDirective<V>
Source§fn clone(&self) -> ConstantDirective<V>
fn clone(&self) -> ConstantDirective<V>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<V: Debug> Debug for ConstantDirective<V>
impl<V: Debug> Debug for ConstantDirective<V>
Source§impl<V: PartialEq> PartialEq for ConstantDirective<V>
impl<V: PartialEq> PartialEq for ConstantDirective<V>
impl<V: PartialEq> StructuralPartialEq for ConstantDirective<V>
Auto Trait Implementations§
impl<V> Freeze for ConstantDirective<V>where
V: Freeze,
impl<V> RefUnwindSafe for ConstantDirective<V>where
V: RefUnwindSafe,
impl<V> Send for ConstantDirective<V>where
V: Send,
impl<V> Sync for ConstantDirective<V>where
V: Sync,
impl<V> Unpin for ConstantDirective<V>where
V: Unpin,
impl<V> UnsafeUnpin for ConstantDirective<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for ConstantDirective<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].