[][src]Struct llhd::ir::Signature

pub struct Signature { /* fields omitted */ }

A description of the input and output arguments of a unit.

Methods

impl Signature[src]

pub fn new() -> Self[src]

Create a new signature.

pub fn add_input(&mut self, ty: Type) -> Arg[src]

Add an input argument.

pub fn add_output(&mut self, ty: Type) -> Arg[src]

Add an output argument.

pub fn set_return_type(&mut self, ty: Type)[src]

Set the return type of the signature.

pub fn return_type(&self) -> Type[src]

Get the return type of the signature.

pub fn has_inputs(&self) -> bool[src]

Check whether the signature has any inputs.

pub fn has_outputs(&self) -> bool[src]

Check whether the signature has any outputs.

pub fn has_return_type(&self) -> bool[src]

Check whether the signature has a return type.

pub fn inputs<'a>(&'a self) -> impl Iterator<Item = Arg> + 'a[src]

Return an iterator over the inputs of the signature.

pub fn outputs<'a>(&'a self) -> impl Iterator<Item = Arg> + 'a[src]

Return an iterator over the outputs of the signature.

pub fn args<'a>(&'a self) -> impl Iterator<Item = Arg> + 'a[src]

Return an iterator over the arguments of the signature.

Inputs come first, then outputs.

pub fn arg_type(&self, arg: Arg) -> Type[src]

Return the type of argument arg.

pub fn is_input(&self, arg: Arg) -> bool[src]

Check whether arg is an input.

pub fn is_output(&self, arg: Arg) -> bool[src]

Check whether arg is an output.

pub fn dump<'a>(&'a self, dfg: &'a DataFlowGraph) -> SignatureDumper<'a>[src]

Dump the signature in human-readable form.

Trait Implementations

impl Clone for Signature[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Signature[src]

impl PartialEq<Signature> for Signature[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Eq for Signature[src]

impl Display for Signature[src]

impl Debug for Signature[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]