Struct hugr_core::hugr::views::descendants::DescendantsGraph
source · pub struct DescendantsGraph<'g, Root = Node> { /* private fields */ }Expand description
View of a HUGR descendants graph.
Includes the root node (which uniquely has no parent) and all its descendants.
See SiblingGraph for a view that includes only the root and
its immediate children. Prefer using SiblingGraph when possible,
as it is more efficient.
Implements the HierarchyView trait, as well as HugrView, it can be
used interchangeably with SiblingGraph.
Trait Implementations§
source§impl<'g, Root: Clone> Clone for DescendantsGraph<'g, Root>
impl<'g, Root: Clone> Clone for DescendantsGraph<'g, Root>
source§fn clone(&self) -> DescendantsGraph<'g, Root>
fn clone(&self) -> DescendantsGraph<'g, Root>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'a, Root> HierarchyView<'a> for DescendantsGraph<'a, Root>where
Root: NodeHandle,
impl<'a, Root> HierarchyView<'a> for DescendantsGraph<'a, Root>where
Root: NodeHandle,
source§impl<'g, Root> HugrInternals for DescendantsGraph<'g, Root>where
Root: NodeHandle,
impl<'g, Root> HugrInternals for DescendantsGraph<'g, Root>where
Root: NodeHandle,
§type Portgraph<'p> = &'p FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>>
where
Self: 'p
type Portgraph<'p> = &'p FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> where Self: 'p
The underlying portgraph view type.
source§impl<'g, Root: NodeHandle> HugrView for DescendantsGraph<'g, Root>
impl<'g, Root: NodeHandle> HugrView for DescendantsGraph<'g, Root>
§type Nodes<'a> = MapSpecialCase<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as PortView>::Nodes<'a>, MapSpecialCaseFnInto<Node>>
where
Self: 'a
type Nodes<'a> = MapSpecialCase<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as PortView>::Nodes<'a>, MapSpecialCaseFnInto<Node>> where Self: 'a
An Iterator over the nodes in a Hugr(View)
§type NodePorts<'a> = MapSpecialCase<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as PortView>::NodePortOffsets<'a>, MapSpecialCaseFnInto<Port>>
where
Self: 'a
type NodePorts<'a> = MapSpecialCase<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as PortView>::NodePortOffsets<'a>, MapSpecialCaseFnInto<Port>> where Self: 'a
An Iterator over (some or all) ports of a node
§type Children<'a> = MapSpecialCase<Children<'a>, MapSpecialCaseFnInto<Node>>
where
Self: 'a
type Children<'a> = MapSpecialCase<Children<'a>, MapSpecialCaseFnInto<Node>> where Self: 'a
An Iterator over the children of a node
§type Neighbours<'a> = MapSpecialCase<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as LinkView>::Neighbours<'a>, MapSpecialCaseFnInto<Node>>
where
Self: 'a
type Neighbours<'a> = MapSpecialCase<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as LinkView>::Neighbours<'a>, MapSpecialCaseFnInto<Node>> where Self: 'a
An Iterator over (some or all) the nodes neighbouring a node
§type PortLinks<'a> = MapCtx<WithCtx<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as LinkView>::PortLinks<'a>, &'a DescendantsGraph<'g, Root>>, (Node, Port)>
where
Self: 'a
type PortLinks<'a> = MapCtx<WithCtx<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as LinkView>::PortLinks<'a>, &'a DescendantsGraph<'g, Root>>, (Node, Port)> where Self: 'a
Iterator over the children of a node
§type NodeConnections<'a> = MapCtx<WithCtx<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as LinkView>::NodeConnections<'a>, &'a DescendantsGraph<'g, Root>>, [Port; 2]>
where
Self: 'a
type NodeConnections<'a> = MapCtx<WithCtx<<FilteredGraph<&'g MultiPortGraph, fn(_: NodeIndex, _: &RegionContext<'g>) -> bool, fn(_: PortIndex, _: &RegionContext<'g>) -> bool, RegionContext<'g>> as LinkView>::NodeConnections<'a>, &'a DescendantsGraph<'g, Root>>, [Port; 2]> where Self: 'a
Iterator over the links between two nodes.
source§fn contains_node(&self, node: Node) -> bool
fn contains_node(&self, node: Node) -> bool
Returns whether the node exists.
source§fn node_count(&self) -> usize
fn node_count(&self) -> usize
Returns the number of nodes in the hugr.
source§fn edge_count(&self) -> usize
fn edge_count(&self) -> usize
Returns the number of edges in the hugr.
source§fn node_ports(&self, node: Node, dir: Direction) -> Self::NodePorts<'_>
fn node_ports(&self, node: Node, dir: Direction) -> Self::NodePorts<'_>
Iterator over ports of node in a given direction.
source§fn all_node_ports(&self, node: Node) -> Self::NodePorts<'_>
fn all_node_ports(&self, node: Node) -> Self::NodePorts<'_>
Iterator over both the input and output ports of node.
source§fn linked_ports(&self, node: Node, port: impl Into<Port>) -> Self::PortLinks<'_>
fn linked_ports(&self, node: Node, port: impl Into<Port>) -> Self::PortLinks<'_>
Iterator over the nodes and ports connected to a port.
source§fn node_connections(&self, node: Node, other: Node) -> Self::NodeConnections<'_>
fn node_connections(&self, node: Node, other: Node) -> Self::NodeConnections<'_>
Iterator the links between two nodes.
source§fn num_ports(&self, node: Node, dir: Direction) -> usize
fn num_ports(&self, node: Node, dir: Direction) -> usize
Number of ports in node for a given direction.
source§fn children(&self, node: Node) -> Self::Children<'_>
fn children(&self, node: Node) -> Self::Children<'_>
Return iterator over the direct children of node.
source§fn neighbours(&self, node: Node, dir: Direction) -> Self::Neighbours<'_>
fn neighbours(&self, node: Node, dir: Direction) -> Self::Neighbours<'_>
Iterates over neighbour nodes in the given direction.
May contain duplicates if the graph has multiple links between nodes.
source§fn all_neighbours(&self, node: Node) -> Self::Neighbours<'_>
fn all_neighbours(&self, node: Node) -> Self::Neighbours<'_>
Iterates over the input and output neighbours of the
node in sequence.source§fn valid_node(&self, node: Node) -> bool
fn valid_node(&self, node: Node) -> bool
Validates that a node is valid in the graph.
source§fn valid_non_root(&self, node: Node) -> bool
fn valid_non_root(&self, node: Node) -> bool
Validates that a node is a valid root descendant in the graph. Read more
source§fn get_optype(&self, node: Node) -> &OpType
fn get_optype(&self, node: Node) -> &OpType
Returns the operation type of a node.
source§fn get_nodetype(&self, node: Node) -> &NodeType
fn get_nodetype(&self, node: Node) -> &NodeType
Returns the type of a node.
source§fn get_metadata(
&self,
node: Node,
key: impl AsRef<str>
) -> Option<&NodeMetadata>
fn get_metadata( &self, node: Node, key: impl AsRef<str> ) -> Option<&NodeMetadata>
Returns the metadata associated with a node.
source§fn get_node_metadata(&self, node: Node) -> Option<&NodeMetadataMap>
fn get_node_metadata(&self, node: Node) -> Option<&NodeMetadataMap>
Retrieve the complete metadata map for a node.
source§fn node_outputs(&self, node: Node) -> OutgoingPorts<Self::NodePorts<'_>>
fn node_outputs(&self, node: Node) -> OutgoingPorts<Self::NodePorts<'_>>
Iterator over output ports of node.
Like
node_ports(node, Direction::Outgoing)
but preserves knowledge that the ports are OutgoingPorts.source§fn node_inputs(&self, node: Node) -> IncomingPorts<Self::NodePorts<'_>>
fn node_inputs(&self, node: Node) -> IncomingPorts<Self::NodePorts<'_>>
Iterator over inputs ports of node.
Like
node_ports(node, Direction::Incoming)
but preserves knowledge that the ports are IncomingPorts.source§fn all_linked_ports(
&self,
node: Node,
dir: Direction
) -> Either<impl Iterator<Item = (Node, OutgoingPort)>, impl Iterator<Item = (Node, IncomingPort)>> ⓘ
fn all_linked_ports( &self, node: Node, dir: Direction ) -> Either<impl Iterator<Item = (Node, OutgoingPort)>, impl Iterator<Item = (Node, IncomingPort)>> ⓘ
Iterator over all the nodes and ports connected to a node in a given direction.
source§fn all_linked_outputs(
&self,
node: Node
) -> impl Iterator<Item = (Node, OutgoingPort)>
fn all_linked_outputs( &self, node: Node ) -> impl Iterator<Item = (Node, OutgoingPort)>
Iterator over all the nodes and ports connected to a node’s inputs.
source§fn all_linked_inputs(
&self,
node: Node
) -> impl Iterator<Item = (Node, IncomingPort)>
fn all_linked_inputs( &self, node: Node ) -> impl Iterator<Item = (Node, IncomingPort)>
Iterator over all the nodes and ports connected to a node’s outputs.
source§fn single_linked_port(
&self,
node: Node,
port: impl Into<Port>
) -> Option<(Node, Port)>
fn single_linked_port( &self, node: Node, port: impl Into<Port> ) -> Option<(Node, Port)>
If there is exactly one port connected to this port, return
it and its node.
source§fn single_linked_output(
&self,
node: Node,
port: impl Into<IncomingPort>
) -> Option<(Node, OutgoingPort)>
fn single_linked_output( &self, node: Node, port: impl Into<IncomingPort> ) -> Option<(Node, OutgoingPort)>
If there is exactly one OutgoingPort connected to this IncomingPort, return
it and its node.
source§fn single_linked_input(
&self,
node: Node,
port: impl Into<OutgoingPort>
) -> Option<(Node, IncomingPort)>
fn single_linked_input( &self, node: Node, port: impl Into<OutgoingPort> ) -> Option<(Node, IncomingPort)>
If there is exactly one IncomingPort connected to this OutgoingPort, return
it and its node.
source§fn linked_outputs(
&self,
node: Node,
port: impl Into<IncomingPort>
) -> OutgoingNodePorts<Self::PortLinks<'_>>
fn linked_outputs( &self, node: Node, port: impl Into<IncomingPort> ) -> OutgoingNodePorts<Self::PortLinks<'_>>
Iterator over the nodes and output ports connected to a given input port.
Like
linked_ports but preserves knowledge
that the linked ports are OutgoingPorts.source§fn linked_inputs(
&self,
node: Node,
port: impl Into<OutgoingPort>
) -> IncomingNodePorts<Self::PortLinks<'_>>
fn linked_inputs( &self, node: Node, port: impl Into<OutgoingPort> ) -> IncomingNodePorts<Self::PortLinks<'_>>
Iterator over the nodes and input ports connected to a given output port
Like
linked_ports but preserves knowledge
that the linked ports are IncomingPorts.source§fn is_linked(&self, node: Node, port: impl Into<Port>) -> bool
fn is_linked(&self, node: Node, port: impl Into<Port>) -> bool
Returns whether a port is connected.
source§fn num_inputs(&self, node: Node) -> usize
fn num_inputs(&self, node: Node) -> usize
Number of inputs to a node.
Shorthand for
num_ports(node, Direction::Incoming).source§fn num_outputs(&self, node: Node) -> usize
fn num_outputs(&self, node: Node) -> usize
Number of outputs from a node.
Shorthand for
num_ports(node, Direction::Outgoing).source§fn input_neighbours(&self, node: Node) -> Self::Neighbours<'_>
fn input_neighbours(&self, node: Node) -> Self::Neighbours<'_>
Iterates over the input neighbours of the
node.
Shorthand for neighbours(node, Direction::Incoming).source§fn output_neighbours(&self, node: Node) -> Self::Neighbours<'_>
fn output_neighbours(&self, node: Node) -> Self::Neighbours<'_>
Iterates over the output neighbours of the
node.
Shorthand for neighbours(node, Direction::Outgoing).source§fn get_io(&self, node: Node) -> Option<[Node; 2]>
fn get_io(&self, node: Node) -> Option<[Node; 2]>
Get the input and output child nodes of a dataflow parent.
If the node isn’t a dataflow parent, then return None
source§fn get_df_function_type(&self) -> Option<FunctionType>
fn get_df_function_type(&self) -> Option<FunctionType>
Returns the function type defined by this dataflow HUGR. Read more
source§fn get_function_type(&self) -> Option<PolyFuncType>
fn get_function_type(&self) -> Option<PolyFuncType>
Returns the function type defined by this HUGR. Read more
source§fn as_petgraph(&self) -> PetgraphWrapper<'_, Self>where
Self: Sized,
fn as_petgraph(&self) -> PetgraphWrapper<'_, Self>where
Self: Sized,
Return a wrapper over the view that can be used in petgraph algorithms.
source§fn mermaid_string(&self) -> String
fn mermaid_string(&self) -> String
Return the mermaid representation of the underlying hierarchical graph. Read more
source§fn mermaid_string_with_config(&self, config: RenderConfig) -> String
fn mermaid_string_with_config(&self, config: RenderConfig) -> String
Return the mermaid representation of the underlying hierarchical graph. Read more
source§fn dot_string(&self) -> Stringwhere
Self: Sized,
fn dot_string(&self) -> Stringwhere
Self: Sized,
Return the graphviz representation of the underlying graph and hierarchy side by side. Read more
source§fn static_source(&self, node: Node) -> Option<Node>
fn static_source(&self, node: Node) -> Option<Node>
If a node has a static input, return the source node.
source§fn static_targets(
&self,
node: Node
) -> Option<impl Iterator<Item = (Node, IncomingPort)>>
fn static_targets( &self, node: Node ) -> Option<impl Iterator<Item = (Node, IncomingPort)>>
If a node has a static output, return the targets.
source§fn signature(&self, node: Node) -> Option<FunctionType>
fn signature(&self, node: Node) -> Option<FunctionType>
Get the “signature” (incoming and outgoing types) of a node, non-Value
kind ports will be missing.
source§fn value_types(
&self,
node: Node,
dir: Direction
) -> impl Iterator<Item = (Port, Type)>
fn value_types( &self, node: Node, dir: Direction ) -> impl Iterator<Item = (Port, Type)>
Iterator over all outgoing ports that have Value type, along
with corresponding types.
source§fn in_value_types(
&self,
node: Node
) -> impl Iterator<Item = (IncomingPort, Type)>
fn in_value_types( &self, node: Node ) -> impl Iterator<Item = (IncomingPort, Type)>
Iterator over all incoming ports that have Value type, along
with corresponding types.
source§fn out_value_types(
&self,
node: Node
) -> impl Iterator<Item = (OutgoingPort, Type)>
fn out_value_types( &self, node: Node ) -> impl Iterator<Item = (OutgoingPort, Type)>
Iterator over all incoming ports that have Value type, along
with corresponding types.
source§fn validate(&self, reg: &ExtensionRegistry) -> Result<(), ValidationError>
fn validate(&self, reg: &ExtensionRegistry) -> Result<(), ValidationError>
Check the validity of the underlying HUGR.
source§fn validate_no_extensions(
&self,
reg: &ExtensionRegistry
) -> Result<(), ValidationError>
fn validate_no_extensions( &self, reg: &ExtensionRegistry ) -> Result<(), ValidationError>
Check the validity of the underlying HUGR, but don’t check consistency
of extension requirements between connected nodes or between parents and
children.
source§impl<'g, Root: NodeHandle> RootTagged for DescendantsGraph<'g, Root>
impl<'g, Root: NodeHandle> RootTagged for DescendantsGraph<'g, Root>
§type RootHandle = Root
type RootHandle = Root
The kind of handle that can be used to refer to the root node. Read more
Auto Trait Implementations§
impl<'g, Root = Node> !Freeze for DescendantsGraph<'g, Root>
impl<'g, Root = Node> !RefUnwindSafe for DescendantsGraph<'g, Root>
impl<'g, Root> Send for DescendantsGraph<'g, Root>where
Root: Send,
impl<'g, Root = Node> !Sync for DescendantsGraph<'g, Root>
impl<'g, Root> Unpin for DescendantsGraph<'g, Root>where
Root: Unpin,
impl<'g, Root = Node> !UnwindSafe for DescendantsGraph<'g, Root>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.