pub enum ProgramDirective<V = Value, Ty = Type> {
File(String),
Function(FunctionDirective<Ty>),
Entry(String),
Const(ConstantDirective<V>),
SourceSymbol(SourceSymbolInfo),
}Expand description
One standard header directive.
Variants§
File(String)
.file "path": the file of the .func directives that follow.
Function(FunctionDirective<Ty>)
.func @name(...) -> ..., locals N: a function declaration.
Entry(String)
.entry @name: the entry function.
Const(ConstantDirective<V>)
.const <value>: the next constant-pool entry.
SourceSymbol(SourceSymbolInfo)
.source_symbol <index> "<name>": a source-level symbol.
Trait Implementations§
Source§impl<V: Clone, Ty: Clone> Clone for ProgramDirective<V, Ty>
impl<V: Clone, Ty: Clone> Clone for ProgramDirective<V, Ty>
Source§fn clone(&self) -> ProgramDirective<V, Ty>
fn clone(&self) -> ProgramDirective<V, Ty>
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, Ty> Extend<ProgramDirective<V, Ty>> for ProgramHeader<V, Ty>
impl<V, Ty> Extend<ProgramDirective<V, Ty>> for ProgramHeader<V, Ty>
Source§fn extend<T: IntoIterator<Item = ProgramDirective<V, Ty>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = ProgramDirective<V, Ty>>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<V, Ty> FromIterator<ProgramDirective<V, Ty>> for ProgramHeader<V, Ty>
impl<V, Ty> FromIterator<ProgramDirective<V, Ty>> for ProgramHeader<V, Ty>
Source§fn from_iter<T: IntoIterator<Item = ProgramDirective<V, Ty>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = ProgramDirective<V, Ty>>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<'src, V, Ty> Parse<'src> for ProgramDirective<V, Ty>
impl<'src, V, Ty> Parse<'src> for ProgramDirective<V, Ty>
Source§impl<V, Ty> StandardDirective for ProgramDirective<V, Ty>
impl<V, Ty> StandardDirective for ProgramDirective<V, Ty>
impl<V: PartialEq, Ty: PartialEq> StructuralPartialEq for ProgramDirective<V, Ty>
Auto Trait Implementations§
impl<V, Ty> Freeze for ProgramDirective<V, Ty>where
V: Freeze,
impl<V, Ty> RefUnwindSafe for ProgramDirective<V, Ty>where
V: RefUnwindSafe,
Ty: RefUnwindSafe,
impl<V, Ty> Send for ProgramDirective<V, Ty>
impl<V, Ty> Sync for ProgramDirective<V, Ty>
impl<V, Ty> Unpin for ProgramDirective<V, Ty>
impl<V, Ty> UnsafeUnpin for ProgramDirective<V, Ty>where
V: UnsafeUnpin,
impl<V, Ty> UnwindSafe for ProgramDirective<V, Ty>where
V: UnwindSafe,
Ty: 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].