pub struct GateQuery<'a> { /* private fields */ }Expand description
Builder for querying and filtering gates
GateQuery provides a fluent API for filtering gates by various criteria
such as parameters, scope, and other properties.
§Example
use flow_gates::{GateQuery, Gate};
// In practice, you would get gates from storage
// let gate1 = /* ... */;
// let gate2 = /* ... */;
// let gate3 = /* ... */;
// let gates = vec![&gate1, &gate2, &gate3];
// let filtered: Vec<&Gate> = GateQuery::new(gates.iter().copied())
// .by_parameters("FSC-A", "SSC-A")
// .by_scope(Some("file-guid"))
// .collect();Implementations§
Source§impl<'a> GateQuery<'a>
impl<'a> GateQuery<'a>
Sourcepub fn new(gates: impl Iterator<Item = &'a Gate>) -> Self
pub fn new(gates: impl Iterator<Item = &'a Gate>) -> Self
Create a new query builder from an iterator of gates
§Arguments
gates- Iterator over gate references
Sourcepub fn by_parameters(self, x: &str, y: &str) -> Self
pub fn by_parameters(self, x: &str, y: &str) -> Self
Filter gates by parameters (channels)
Only gates that operate on the specified x and y parameters are retained.
§Arguments
x- X-axis parameter namey- Y-axis parameter name
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GateQuery<'a>
impl<'a> RefUnwindSafe for GateQuery<'a>
impl<'a> Send for GateQuery<'a>
impl<'a> Sync for GateQuery<'a>
impl<'a> Unpin for GateQuery<'a>
impl<'a> UnwindSafe for GateQuery<'a>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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