[−][src]Struct llhd::ir::prelude::Signature
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 Eq for Signature
[src]
impl Clone for Signature
[src]
fn clone(&self) -> Signature
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Signature> for Signature
[src]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Default for Signature
[src]
impl Debug for Signature
[src]
impl Display for Signature
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto 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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,