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 Freeze for FilteredNodes
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
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 more