pub trait FatExt: HugrView {
// Provided methods
fn try_fat<OT>(&self, node: Node) -> Option<FatNode<'_, OT, Self>>
where for<'a> &'a OpType: TryInto<&'a OT> { ... }
fn fat_optype(&self, node: Node) -> FatNode<'_, OpType, Self> { ... }
fn fat_io(
&self,
node: Node,
) -> Option<(FatNode<'_, Input, Self>, FatNode<'_, Output, Self>)> { ... }
fn fat_children(
&self,
node: Node,
) -> impl Iterator<Item = FatNode<'_, OpType, Self>> { ... }
fn fat_root<OT>(&self) -> Option<FatNode<'_, OT, Self>>
where for<'a> &'a OpType: TryInto<&'a OT> { ... }
}
Expand description
An extension trait for HugrView which provides methods that delegate to HugrView and then return the result in FatNode form. See for example FatExt::fat_io.
TODO: Add the remaining HugrView equivalents that make sense.
Provided Methods§
sourcefn fat_optype(&self, node: Node) -> FatNode<'_, OpType, Self>
fn fat_optype(&self, node: Node) -> FatNode<'_, OpType, Self>
sourcefn fat_io(
&self,
node: Node,
) -> Option<(FatNode<'_, Input, Self>, FatNode<'_, Output, Self>)>
fn fat_io( &self, node: Node, ) -> Option<(FatNode<'_, Input, Self>, FatNode<'_, Output, Self>)>
Object Safety§
This trait is not object safe.