Skip to main content

LiveFilter

Struct LiveFilter 

Source
pub struct LiveFilter<Predicate> { /* private fields */ }
Expand description

The filtering (read) half of a live_filter split: a SendPipe whose predicate is swapped live by the paired FilterControl. Clone is a single Arc bump — hand a clone to every subscriber.

Implementations§

Source§

impl<Predicate> LiveFilter<Predicate>

Source

pub fn snapshot(&self) -> Arc<Predicate> ⓘ

Snapshot the current predicate (introspection).

Source§

impl<Id: Ord> LiveFilter<IdSet<Id>>

Source

pub fn contains(&self, id: &Id) -> bool

Synchronous membership check — for a control-plane query that only asks “does id match” and never forwards the item onward (unlike the SendPipe form, which admits or rejects an item flowing through it).

Trait Implementations§

Source§

impl<Predicate> Clone for LiveFilter<Predicate>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Item, Predicate> SendPipe for LiveFilter<Predicate>
where Predicate: SendPipe<In = Item, Out = Item> + Send + Sync + 'static, Item: Send + 'static,

Source§

type In = Item

Input the pipe consumes.
Source§

type Out = Item

Output the pipe produces.
Source§

type Err = <Predicate as SendPipe>::Err

Error the pipe can fail with — Send here so it can cross cores.
Source§

fn call( &self, input: Item, ) -> impl Future<Output = Result<Item, Predicate::Err>> + Send

Apply the pipe. The returned future IS Send.

Auto Trait Implementations§

§

impl<Predicate> Freeze for LiveFilter<Predicate>
where Live<Predicate>: Freeze,

§

impl<Predicate> RefUnwindSafe for LiveFilter<Predicate>
where Live<Predicate>: RefUnwindSafe,

§

impl<Predicate> Send for LiveFilter<Predicate>
where Live<Predicate>: Send,

§

impl<Predicate> Sync for LiveFilter<Predicate>
where Live<Predicate>: Sync,

§

impl<Predicate> Unpin for LiveFilter<Predicate>
where Live<Predicate>: Unpin,

§

impl<Predicate> UnsafeUnpin for LiveFilter<Predicate>
where Live<Predicate>: UnsafeUnpin,

§

impl<Predicate> UnwindSafe for LiveFilter<Predicate>
where Live<Predicate>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<Implementor> Handler for Implementor
where Implementor: SendPipe<In = Request<Bytes>, Out = Response<Bytes>, Err = ProximaError>,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P> SendDynPipe<<P as SendPipe>::In, <P as SendPipe>::Out> for P
where P: SendPipe, <P as SendPipe>::In: Send, ProximaError: From<<P as SendPipe>::Err>,

Source§

fn call_dyn( &self, input: <P as SendPipe>::In, ) -> Pin<Box<dyn Future<Output = Result<<P as SendPipe>::Out, ProximaError>> + Send + '_>>

Erased dispatch — boxes the inner pipe’s Send future and converts its error into ProximaError.
Source§

impl<Implementor> SourcePipe for Implementor
where Implementor: SendPipe<In = Signal, Out = (), Err = ProximaError>,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more