[−][src]Struct llhd::ir::Signature
A description of the input and output arguments of a unit.
Implementations
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, unit: &Unit<'a>) -> SignatureDumper<'a>
[src]
Dump the signature in human-readable form.
Trait Implementations
impl Clone for Signature
[src]
impl Debug for Signature
[src]
impl Default for Signature
[src]
impl<'de> Deserialize<'de> for Signature
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Signature
[src]
impl Eq for Signature
[src]
impl PartialEq<Signature> for Signature
[src]
impl Serialize for Signature
[src]
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,