Struct Observable

Source
pub struct Observable<'a, Item>
where Item: Clone + Send + Sync,
{ /* private fields */ }

Implementations§

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn create<Source>(source: Source) -> Observable<'a, Item>
where Source: Fn(Observer<'a, Item>) + Send + Sync + 'a,

Source

pub fn subscribe<Next, Error, Complete>( &self, next: Next, error: Error, complete: Complete, ) -> Subscription<'a>
where Next: Fn(Item) + Send + Sync + 'a, Error: Fn(RxError) + Send + Sync + 'a, Complete: Fn() + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn all<F>(&self, f: F) -> Observable<'a, bool>
where F: Fn(Item) -> bool + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn amb(&self, observables: &[Observable<'a, Item>]) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn buffer_with_count(&self, count: usize) -> Observable<'a, Vec<Item>>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn combine_latest<Out, F>( &self, observables: &[Observable<'a, Item>], f: F, ) -> Observable<'a, Out>
where Out: Clone + Send + Sync, F: Fn(Vec<Item>) -> Out + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn concat( &self, observables: &[Observable<'a, Item>], ) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync + PartialEq,

Source

pub fn contains(&self, target: Item) -> Observable<'a, bool>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn count(&self) -> Observable<'a, usize>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn default_if_empty(&self, target: Item) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Material<Item>>
where Item: Clone + Send + Sync,

Source

pub fn dematerialize(&self) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync + PartialEq,

Source

pub fn distinct_until_changed(&self) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn element_at(&self, count: usize) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn filter<F>(&self, f: F) -> Observable<'a, Item>
where F: Fn(Item) -> bool + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn first(&self) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn flat_map<Out, F>(&self, f: F) -> Observable<'a, Out>
where F: Fn(Item) -> Observable<'a, Out> + Send + Sync + 'a, Out: Clone + Send + Sync,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn group_by<Key, F>(&self, f: F) -> Observable<'a, Observable<'a, Item>>
where F: Fn(Item) -> Key + Send + Sync + 'a, Key: Clone + Send + Sync + Hash + Eq + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn ignore_elements(&self) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn last(&self) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn map<Out, F>(&self, f: F) -> Observable<'a, Out>
where F: Fn(Item) -> Out + Send + Sync + 'a, Out: Clone + Send + Sync,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync + 'static,

Source

pub fn map_to_any( &self, ) -> Observable<'a, Arc<Box<dyn Any + Send + Sync + 'static>>>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn materialize(&self) -> Observable<'a, Material<Item>>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync + PartialOrd,

Source

pub fn max(&self) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn merge( &self, observables: &[Observable<'a, Item>], ) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync + PartialOrd,

Source

pub fn min(&self) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn observe_on<Scheduler, SchedulerCreator>( &self, scheduler_ctor: SchedulerCreator, ) -> Observable<'a, Item>
where Scheduler: IScheduler<'a> + Clone + Send + Sync + 'a, SchedulerCreator: Fn() -> Scheduler + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn on_error_resume_next<F>(&self, f: F) -> Observable<'a, Item>
where F: Fn(RxError) -> Observable<'a, Item> + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn publish(&self) -> Publish<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn reduce<F>(&self, f: F) -> Observable<'a, Item>
where F: Fn((Item, Item)) -> Item + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn ref_count(&self) -> RefCount<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn replay(&self) -> Replay<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn retry(&self, max_retry: usize) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn retry_when<F>(&self, f: F) -> Observable<'a, Item>
where F: Fn(RxError) -> bool + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn sample<TriggerValue>( &self, trigger: Observable<'a, TriggerValue>, ) -> Observable<'a, Item>
where TriggerValue: Clone + Send + Sync,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn scan<F>(&self, f: F) -> Observable<'a, Item>
where F: Fn((Item, Item)) -> Item + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync + PartialEq,

Source

pub fn sequence_equal( &self, observables: &[Observable<'a, Item>], ) -> Observable<'a, bool>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn skip(&self, count: usize) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn skip_last(&self, count: usize) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn skip_until<TriggerValue>( &self, trigger: Observable<'a, TriggerValue>, ) -> Observable<'a, Item>
where TriggerValue: Clone + Send + Sync,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn skip_while<F>(&self, f: F) -> Observable<'a, Item>
where F: Fn(Item) -> bool + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn start_with<Iter>(&self, iter: Iter) -> Observable<'a, Item>
where Iter: Iterator<Item = Item> + Clone + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn subscribe_on<Scheduler, SchedulerCreator>( &self, scheduler_ctor: SchedulerCreator, ) -> Observable<'a, Item>
where Scheduler: IScheduler<'a> + Clone + Send + Sync + 'a, SchedulerCreator: Fn() -> Scheduler + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync + Add<Output = Item>,

Source

pub fn sum(&self) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync + Add<Output = Item>,

Source

pub fn sum_and_count(&self) -> Observable<'a, (Item, usize)>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn switch_on_next( &self, target: Observable<'a, Item>, ) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn take(&self, count: usize) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn take_last(&self, count: usize) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn take_until<TriggerValue>( &self, trigger: Observable<'a, TriggerValue>, ) -> Observable<'a, Item>
where TriggerValue: Clone + Send + Sync,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn take_while<F>(&self, f: F) -> Observable<'a, Item>
where F: Fn(Item) -> bool + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn tap<Next, Error, Complete>( &self, next: Next, error: Error, complete: Complete, ) -> Observable<'a, Item>
where Next: Fn(Item) + Send + Sync + 'a, Error: Fn(RxError) + Send + Sync + 'a, Complete: Fn() + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn to_vec(&self) -> ToVec<'_, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn window_with_count( &self, count: usize, ) -> Observable<'a, Observable<'a, Item>>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn zip( &self, observables: &[Observable<'a, Item>], ) -> Observable<'a, Vec<Item>>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn debounce<Scheduler, SchedulerCreator>( &self, dur: Duration, scheduler_ctor: SchedulerCreator, ) -> Observable<'a, Item>
where Scheduler: IScheduler<'a> + Clone + Send + Sync + 'a, SchedulerCreator: Fn() -> Scheduler + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn delay(&self, dur: Duration) -> Observable<'a, Item>

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn timeout<Scheduler, SchedulerCreator>( &self, dur: Duration, scheduler_ctor: SchedulerCreator, ) -> Observable<'a, Item>
where Scheduler: IScheduler<'a> + Clone + Send + Sync + 'a, SchedulerCreator: Fn() -> Scheduler + Send + Sync + 'a,

Source§

impl<'a, Item> Observable<'a, Item>
where Item: Clone + Send + Sync,

Source

pub fn timestamp(&self) -> Observable<'a, (SystemTime, Item)>

Trait Implementations§

Source§

impl<'a, Item> Clone for Observable<'a, Item>
where Item: Clone + Send + Sync + Clone,

Source§

fn clone(&self) -> Observable<'a, Item>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'a, Item> Freeze for Observable<'a, Item>

§

impl<'a, Item> RefUnwindSafe for Observable<'a, Item>

§

impl<'a, Item> Send for Observable<'a, Item>

§

impl<'a, Item> Sync for Observable<'a, Item>

§

impl<'a, Item> Unpin for Observable<'a, Item>

§

impl<'a, Item> UnwindSafe for Observable<'a, Item>

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<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<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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.