Struct fbas_analyzer::FilteredNodes
source · pub struct FilteredNodes(/* private fields */);
Expand description
The result of filtering nodes by a predicate. Transform into_pretty_vec
for usage in one of
several without_nodes
functions.
use fbas_analyzer::FilteredNodes;
let input = r#"[
{
"publicKey": "Alice",
"active": true
},
{
"publicKey": "Bob",
"active": false
},
{
"publicKey": "Charlie"
}
]"#;
let inactive_nodes = FilteredNodes::from_json_str(&input, |v| v["active"] == false);
assert_eq!(vec!["Bob"], inactive_nodes.into_pretty_vec());
Implementations§
source§impl FilteredNodes
impl FilteredNodes
Auto Trait Implementations§
impl RefUnwindSafe for FilteredNodes
impl Send for FilteredNodes
impl Sync for FilteredNodes
impl Unpin for FilteredNodes
impl UnwindSafe for FilteredNodes
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