Skip to main content

ProgramDirective

Enum ProgramDirective 

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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<V: Debug, Ty: Debug> Debug for ProgramDirective<V, Ty>

Source§

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

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

impl<V, Ty> Extend<ProgramDirective<V, Ty>> for ProgramHeader<V, Ty>

Source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

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>

Source§

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>
where V: Parse<'src> + 'src, Ty: Parse<'src> + 'src,

Source§

fn parser() -> impl Parser<'src, &'src str, Self, Err<Simple<'src, char>>>

Source§

impl<V: PartialEq, Ty: PartialEq> PartialEq for ProgramDirective<V, Ty>

Source§

fn eq(&self, other: &ProgramDirective<V, Ty>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<V: Print, Ty: Print> Print for ProgramDirective<V, Ty>

Source§

fn print(&self, out: &mut dyn Write) -> Result

Write the canonical source spelling of self to out.
Source§

fn to_source(&self) -> Result<String, Report>

Return the canonical source spelling of self as a string.
Source§

impl<V, Ty> StandardDirective for ProgramDirective<V, Ty>

Source§

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>

§

impl<V, Ty> Send for ProgramDirective<V, Ty>
where V: Send, Ty: Send,

§

impl<V, Ty> Sync for ProgramDirective<V, Ty>
where V: Sync, Ty: Sync,

§

impl<V, Ty> Unpin for ProgramDirective<V, Ty>
where V: Unpin, Ty: Unpin,

§

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

§

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

§

type Proj<U: 'src> = U

§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

§

impl<T> OrderedSeq<'_, T> for T
where T: Clone,

§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
§

fn contains(&self, val: &T) -> bool
where 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,

Convert an item of the sequence into a [MaybeRef].
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, 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.