pub struct PortGraph<N: Unsigned = u32, P: Unsigned = u32, PO: Unsigned = u16> { /* private fields */ }Expand description
An unlabelled port graph.
A port graph consists of a collection of nodes identified by a NodeIndex.
Each node has an ordered sequence of input and output ports, identified by a PortIndex that is unique within the graph.
To optimize for the most common use case, the number of input and output ports of a node must be specified when the node is created.
When a node and its associated ports are removed their indices will be reused on a best effort basis
when a new node is added.
The indices of unaffected nodes and ports remain stable.
PortGraph::compact_nodes and PortGraph::compact_ports to eliminate fragmentation in the index space.
Implementations§
Trait Implementations§
Source§impl<N: Clone + Unsigned, P: Clone + Unsigned, PO: Clone + Unsigned> Clone for PortGraph<N, P, PO>
impl<N: Clone + Unsigned, P: Clone + Unsigned, PO: Clone + Unsigned> Clone for PortGraph<N, P, PO>
Source§impl From<MultiPortGraph> for PortGraph
impl From<MultiPortGraph> for PortGraph
Source§fn from(multi: MultiPortGraph) -> Self
fn from(multi: MultiPortGraph) -> Self
Converts to this type from the input type.
Source§impl From<PortGraph> for MultiPortGraph
impl From<PortGraph> for MultiPortGraph
Source§impl<PO: Unsigned> LinkMut for PortGraph<u32, u32, PO>
impl<PO: Unsigned> LinkMut for PortGraph<u32, u32, PO>
Source§fn link_ports(
&mut self,
port_a: PortIndex,
port_b: PortIndex,
) -> Result<(Self::LinkEndpoint, Self::LinkEndpoint), LinkError<PO>>
fn link_ports( &mut self, port_a: PortIndex, port_b: PortIndex, ) -> Result<(Self::LinkEndpoint, Self::LinkEndpoint), LinkError<PO>>
Link an output port to an input port. Read more
Source§fn unlink_port(&mut self, port: PortIndex) -> Option<PortIndex>
fn unlink_port(&mut self, port: PortIndex) -> Option<PortIndex>
Unlinks all connections to the
port. If the port was connected,
returns one of the ports it was connected to.Source§fn link_nodes(
&mut self,
from: NodeIndex,
from_output: usize,
to: NodeIndex,
to_input: usize,
) -> Result<(Self::LinkEndpoint, Self::LinkEndpoint), LinkError<Self::PortOffsetBase>>
fn link_nodes( &mut self, from: NodeIndex, from_output: usize, to: NodeIndex, to_input: usize, ) -> Result<(Self::LinkEndpoint, Self::LinkEndpoint), LinkError<Self::PortOffsetBase>>
Links two nodes at an input and output port offsets. Read more
Source§fn link_offsets(
&mut self,
node_a: NodeIndex,
offset_a: PortOffset<Self::PortOffsetBase>,
node_b: NodeIndex,
offset_b: PortOffset<Self::PortOffsetBase>,
) -> Result<(Self::LinkEndpoint, Self::LinkEndpoint), LinkError<Self::PortOffsetBase>>
fn link_offsets( &mut self, node_a: NodeIndex, offset_a: PortOffset<Self::PortOffsetBase>, node_b: NodeIndex, offset_b: PortOffset<Self::PortOffsetBase>, ) -> Result<(Self::LinkEndpoint, Self::LinkEndpoint), LinkError<Self::PortOffsetBase>>
Links two nodes at an input and output port offsets. Read more
Source§fn insert_graph(
&mut self,
other: &impl LinkView<PortOffsetBase = Self::PortOffsetBase>,
) -> Result<HashMap<NodeIndex, NodeIndex>, LinkError<Self::PortOffsetBase>>
fn insert_graph( &mut self, other: &impl LinkView<PortOffsetBase = Self::PortOffsetBase>, ) -> Result<HashMap<NodeIndex, NodeIndex>, LinkError<Self::PortOffsetBase>>
Inserts another graph into this graph. Read more
Source§impl<PO: Unsigned> LinkView for PortGraph<u32, u32, PO>
impl<PO: Unsigned> LinkView for PortGraph<u32, u32, PO>
Source§type LinkEndpoint = PortIndex
type LinkEndpoint = PortIndex
The identifier for the endpoints of a link.
Source§fn port_links(
&self,
port: PortIndex,
) -> impl Iterator<Item = (PortIndex, PortIndex)> + Clone
fn port_links( &self, port: PortIndex, ) -> impl Iterator<Item = (PortIndex, PortIndex)> + Clone
Returns the port (or ports if this is a
MultiView) that the given port is linked to.Source§fn link_count(&self) -> usize
fn link_count(&self) -> usize
Returns the number of links between ports.
Source§fn get_connections(
&self,
from: NodeIndex,
to: NodeIndex,
) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
fn get_connections( &self, from: NodeIndex, to: NodeIndex, ) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
Returns an iterator over every pair of matching ports connecting
from
to to, i.e. in that direction. Read moreSource§fn links(
&self,
node: NodeIndex,
direction: Direction,
) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
fn links( &self, node: NodeIndex, direction: Direction, ) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
Source§fn all_links(
&self,
node: NodeIndex,
) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
fn all_links( &self, node: NodeIndex, ) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
Iterates over the connected input and output links of the
node in sequence.Source§fn neighbours(
&self,
node: NodeIndex,
direction: Direction,
) -> impl Iterator<Item = NodeIndex> + Clone
fn neighbours( &self, node: NodeIndex, direction: Direction, ) -> impl Iterator<Item = NodeIndex> + Clone
Iterates over neighbour nodes in the given
direction.
May contain duplicates if the graph has multiple links between nodes. Read moreSource§fn all_neighbours(
&self,
node: NodeIndex,
) -> impl Iterator<Item = NodeIndex> + Clone
fn all_neighbours( &self, node: NodeIndex, ) -> impl Iterator<Item = NodeIndex> + Clone
Iterates over the input and output neighbours of the
node in sequence.Source§fn get_connection(
&self,
from: NodeIndex,
to: NodeIndex,
) -> Option<(Self::LinkEndpoint, Self::LinkEndpoint)>
fn get_connection( &self, from: NodeIndex, to: NodeIndex, ) -> Option<(Self::LinkEndpoint, Self::LinkEndpoint)>
Checks whether there is a directed link between the two nodes and
returns the first matching pair of ports. Read more
Source§fn connected(&self, from: NodeIndex, to: NodeIndex) -> bool
fn connected(&self, from: NodeIndex, to: NodeIndex) -> bool
Checks whether there is a directed link between the two nodes. Read more
Source§fn port_link(&self, port: PortIndex) -> Option<Self::LinkEndpoint>
fn port_link(&self, port: PortIndex) -> Option<Self::LinkEndpoint>
Return the link to the provided port, if not connected return None.
If this port has multiple connected subports, an arbitrary one is returned.
Source§fn input_links(
&self,
node: NodeIndex,
) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
fn input_links( &self, node: NodeIndex, ) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
Iterates over the connected input links of the
node. Shorthand for
LinkView::links(Direction::Incoming).Source§fn output_links(
&self,
node: NodeIndex,
) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
fn output_links( &self, node: NodeIndex, ) -> impl Iterator<Item = (Self::LinkEndpoint, Self::LinkEndpoint)> + Clone
Iterates over the connected output links of the
node. Shorthand for
LinkView::links(Direction::Outgoing)..Source§impl<N: PartialEq + Unsigned, P: PartialEq + Unsigned, PO: PartialEq + Unsigned> PartialEq for PortGraph<N, P, PO>
impl<N: PartialEq + Unsigned, P: PartialEq + Unsigned, PO: PartialEq + Unsigned> PartialEq for PortGraph<N, P, PO>
Source§impl<PO: Unsigned> PortMut for PortGraph<u32, u32, PO>
impl<PO: Unsigned> PortMut for PortGraph<u32, u32, PO>
Source§fn add_node(&mut self, incoming: usize, outgoing: usize) -> NodeIndex
fn add_node(&mut self, incoming: usize, outgoing: usize) -> NodeIndex
Adds a node to the portgraph with a given number of input and output ports. Read more
Source§fn remove_node(&mut self, node: NodeIndex)
fn remove_node(&mut self, node: NodeIndex)
Remove a node from the port graph. All ports of the node will be
unlinked and removed as well. Does nothing if the node does not exist. Read more
Source§fn reserve(&mut self, nodes: usize, ports: usize)
fn reserve(&mut self, nodes: usize, ports: usize)
Reserves enough capacity to insert at least the given number of additional nodes and ports. Read more
Source§fn set_num_ports<F>(
&mut self,
node: NodeIndex,
incoming: usize,
outgoing: usize,
rekey: F,
)
fn set_num_ports<F>( &mut self, node: NodeIndex, incoming: usize, outgoing: usize, rekey: F, )
Source§fn compact_nodes<F>(&mut self, rekey: F)
fn compact_nodes<F>(&mut self, rekey: F)
Compacts the storage of nodes in the portgraph as much as possible. Note
that node indices won’t necessarily be consecutive after this process. Read more
Source§fn swap_nodes(&mut self, a: NodeIndex, b: NodeIndex)
fn swap_nodes(&mut self, a: NodeIndex, b: NodeIndex)
Swaps the indices of two nodes.
Source§fn compact_ports<F>(&mut self, rekey: F)
fn compact_ports<F>(&mut self, rekey: F)
Compacts the storage of ports in the portgraph as much as possible. Note
that indices won’t necessarily be consecutive after this process. Read more
Source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Shrinks the underlying buffers to the fit the data. Read more
Source§impl<PO: Unsigned> PortView for PortGraph<u32, u32, PO>
impl<PO: Unsigned> PortView for PortGraph<u32, u32, PO>
Source§type PortOffsetBase = PO
type PortOffsetBase = PO
The base unsigned integer type for port offsets.
Source§fn port_direction(&self, port: impl Into<PortIndex>) -> Option<Direction>
fn port_direction(&self, port: impl Into<PortIndex>) -> Option<Direction>
Returns the direction of the
port.Source§fn port_node(&self, port: impl Into<PortIndex>) -> Option<NodeIndex>
fn port_node(&self, port: impl Into<PortIndex>) -> Option<NodeIndex>
Returns the node that the
port belongs to.Source§fn port_offset(&self, port: impl Into<PortIndex>) -> Option<PortOffset<PO>>
fn port_offset(&self, port: impl Into<PortIndex>) -> Option<PortOffset<PO>>
Returns the index of a
port within its node’s port list.Source§fn port_index(
&self,
node: NodeIndex,
offset: PortOffset<PO>,
) -> Option<PortIndex>
fn port_index( &self, node: NodeIndex, offset: PortOffset<PO>, ) -> Option<PortIndex>
Returns the port index for a given node and offset.
Source§fn input(&self, node: NodeIndex, offset: usize) -> Option<PortIndex>
fn input(&self, node: NodeIndex, offset: usize) -> Option<PortIndex>
Returns the input port at the given offset in the
node. Read moreSource§fn output(&self, node: NodeIndex, offset: usize) -> Option<PortIndex>
fn output(&self, node: NodeIndex, offset: usize) -> Option<PortIndex>
Returns the output port at the given offset in the
node. Read moreSource§fn num_ports(&self, node: NodeIndex, direction: Direction) -> usize
fn num_ports(&self, node: NodeIndex, direction: Direction) -> usize
Returns the number of ports of the
node in the given direction.Source§fn contains_node(&self, node: NodeIndex) -> bool
fn contains_node(&self, node: NodeIndex) -> bool
Returns whether the port graph contains the
node.Source§fn contains_port(&self, port: PortIndex) -> bool
fn contains_port(&self, port: PortIndex) -> bool
Returns whether the port graph contains the
port.Source§fn node_count(&self) -> usize
fn node_count(&self) -> usize
Returns the number of nodes in the port graph.
Source§fn port_count(&self) -> usize
fn port_count(&self) -> usize
Returns the number of ports in the port graph.
Source§fn node_capacity(&self) -> usize
fn node_capacity(&self) -> usize
Returns the capacity of the underlying buffer for nodes.
Source§fn port_capacity(&self) -> usize
fn port_capacity(&self) -> usize
Returns the capacity of the underlying buffer for ports.
Source§fn node_port_capacity(&self, node: NodeIndex) -> usize
fn node_port_capacity(&self, node: NodeIndex) -> usize
Returns the allocated port capacity for a specific node. Read more
Source§fn ports(
&self,
node: NodeIndex,
direction: Direction,
) -> impl Iterator<Item = PortIndex> + Clone
fn ports( &self, node: NodeIndex, direction: Direction, ) -> impl Iterator<Item = PortIndex> + Clone
Iterates over all the ports of the
node in the given direction.Source§fn all_ports(&self, node: NodeIndex) -> impl Iterator<Item = PortIndex> + Clone
fn all_ports(&self, node: NodeIndex) -> impl Iterator<Item = PortIndex> + Clone
Iterates over the input and output ports of the
node in sequence.Source§fn port_offsets(
&self,
node: NodeIndex,
direction: Direction,
) -> impl Iterator<Item = PortOffset<PO>> + Clone
fn port_offsets( &self, node: NodeIndex, direction: Direction, ) -> impl Iterator<Item = PortOffset<PO>> + Clone
Source§fn all_port_offsets(
&self,
node: NodeIndex,
) -> impl Iterator<Item = PortOffset<PO>> + Clone
fn all_port_offsets( &self, node: NodeIndex, ) -> impl Iterator<Item = PortOffset<PO>> + Clone
Iterates over the input and output port offsets of the
node in sequence.Source§fn nodes_iter(&self) -> impl Iterator<Item = NodeIndex> + Clone
fn nodes_iter(&self) -> impl Iterator<Item = NodeIndex> + Clone
Iterates over the nodes in the port graph.
Source§fn ports_iter(&self) -> impl Iterator<Item = PortIndex> + Clone
fn ports_iter(&self) -> impl Iterator<Item = PortIndex> + Clone
Iterates over the ports in the port graph.
Source§fn inputs(&self, node: NodeIndex) -> impl Iterator<Item = PortIndex> + Clone
fn inputs(&self, node: NodeIndex) -> impl Iterator<Item = PortIndex> + Clone
Iterates over all the input ports of the
node. Read moreSource§fn outputs(&self, node: NodeIndex) -> impl Iterator<Item = PortIndex> + Clone
fn outputs(&self, node: NodeIndex) -> impl Iterator<Item = PortIndex> + Clone
Iterates over all the output ports of the
node. Read moreSource§fn num_inputs(&self, node: NodeIndex) -> usize
fn num_inputs(&self, node: NodeIndex) -> usize
Returns the number of input ports of the
node. Read moreSource§fn num_outputs(&self, node: NodeIndex) -> usize
fn num_outputs(&self, node: NodeIndex) -> usize
Returns the number of output ports of the
node. Read moreSource§fn input_offsets(
&self,
node: NodeIndex,
) -> impl Iterator<Item = PortOffset<Self::PortOffsetBase>> + Clone
fn input_offsets( &self, node: NodeIndex, ) -> impl Iterator<Item = PortOffset<Self::PortOffsetBase>> + Clone
Iterates over all the input port offsets of the
node. Read moreSource§fn output_offsets(
&self,
node: NodeIndex,
) -> impl Iterator<Item = PortOffset<Self::PortOffsetBase>> + Clone
fn output_offsets( &self, node: NodeIndex, ) -> impl Iterator<Item = PortOffset<Self::PortOffsetBase>> + Clone
Iterates over all the output port offsets of the
node. Read moreimpl<N: Unsigned, P: Unsigned, PO: Unsigned> StructuralPartialEq for PortGraph<N, P, PO>
Auto Trait Implementations§
impl<N, P, PO> Freeze for PortGraph<N, P, PO>where
N: Freeze,
impl<N, P, PO> RefUnwindSafe for PortGraph<N, P, PO>
impl<N, P, PO> Send for PortGraph<N, P, PO>
impl<N, P, PO> Sync for PortGraph<N, P, PO>
impl<N, P, PO> Unpin for PortGraph<N, P, PO>
impl<N, P, PO> UnwindSafe for PortGraph<N, P, PO>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<G> DotFormat for Gwhere
G: LinkView,
impl<G> DotFormat for Gwhere
G: LinkView,
Source§fn dot_format(&self) -> DotFormatter<'_, G>
fn dot_format(&self) -> DotFormatter<'_, G>
Initialize a
DotFormatter for the graph.Source§fn dot_string(&self) -> String
fn dot_string(&self) -> String
Encode the graph in dot format.
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<G> MermaidFormat for Gwhere
G: LinkView,
impl<G> MermaidFormat for Gwhere
G: LinkView,
Source§fn mermaid_format(&self) -> MermaidFormatter<'_, G>
fn mermaid_format(&self) -> MermaidFormatter<'_, G>
Initialize a
MermaidFormatter for the graph. Read moreSource§fn mermaid_string(&self) -> String
fn mermaid_string(&self) -> String
Encode the graph in mermaid format. See
MermaidFormat::mermaid_format for more control over the output
style. 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.