pub trait FatExt: HugrView {
// Provided methods
fn try_fat<OT>(
&self,
node: Self::Node,
) -> Option<FatNode<'_, OT, Self, Self::Node>>
where for<'a> &'a OpType: TryInto<&'a OT> { ... }
fn fat_optype(
&self,
node: Self::Node,
) -> FatNode<'_, OpType, Self, Self::Node> { ... }
fn fat_io(
&self,
node: Self::Node,
) -> Option<(FatNode<'_, Input, Self, Self::Node>, FatNode<'_, Output, Self, Self::Node>)> { ... }
fn fat_children(
&self,
node: Self::Node,
) -> impl Iterator<Item = FatNode<'_, OpType, Self, Self::Node>> { ... }
fn fat_root(&self) -> Option<FatNode<'_, Module, Self, Self::Node>> { ... }
fn fat_entrypoint<OT>(&self) -> Option<FatNode<'_, OT, Self, Self::Node>>
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_io(
&self,
node: Self::Node,
) -> Option<(FatNode<'_, Input, Self, Self::Node>, FatNode<'_, Output, Self, Self::Node>)>
fn fat_io( &self, node: Self::Node, ) -> Option<(FatNode<'_, Input, Self, Self::Node>, FatNode<'_, Output, Self, Self::Node>)>
Sourcefn fat_children(
&self,
node: Self::Node,
) -> impl Iterator<Item = FatNode<'_, OpType, Self, Self::Node>>
fn fat_children( &self, node: Self::Node, ) -> impl Iterator<Item = FatNode<'_, OpType, Self, Self::Node>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.