pub enum NodeSelector {
All,
ByKind(GraphNodeKind),
Explicit(Vec<NodeId>),
HasMetadata(String),
Predicate(Box<dyn Fn(&GraphNode) -> bool + Send + Sync>),
}Expand description
Determines which nodes a sampler should operate on.
Variants§
All
Sample every node in the graph.
ByKind(GraphNodeKind)
Only nodes whose kind matches.
Explicit(Vec<NodeId>)
Only nodes with these specific IDs.
HasMetadata(String)
Only nodes whose metadata contains the given key.
Predicate(Box<dyn Fn(&GraphNode) -> bool + Send + Sync>)
Custom predicate (not serializable — use for in-process composition).
Implementations§
Trait Implementations§
Source§impl Debug for NodeSelector
impl Debug for NodeSelector
Auto Trait Implementations§
impl !RefUnwindSafe for NodeSelector
impl !UnwindSafe for NodeSelector
impl Freeze for NodeSelector
impl Send for NodeSelector
impl Sync for NodeSelector
impl Unpin for NodeSelector
impl UnsafeUnpin for NodeSelector
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