pub struct Observable { /* private fields */ }Expand description
The Observable class.
Observable
Implementations§
Source§impl Observable
impl Observable
Sourcepub fn new(callback: &Function) -> Observable
pub fn new(callback: &Function) -> Observable
The new Observable(..) constructor, creating a new Observable instance
Source§impl Observable
impl Observable
Sourcepub fn subscribe(&self) -> Undefined
pub fn subscribe(&self) -> Undefined
The subscribe method.
Observable.subscribe
Source§impl Observable
impl Observable
Sourcepub fn subscribe_with_observer(&self, observer: &Any) -> Undefined
pub fn subscribe_with_observer(&self, observer: &Any) -> Undefined
The subscribe method.
Observable.subscribe
Source§impl Observable
impl Observable
Sourcepub fn subscribe_with_observer_and_options(
&self,
observer: &Any,
options: &SubscribeOptions,
) -> Undefined
pub fn subscribe_with_observer_and_options( &self, observer: &Any, options: &SubscribeOptions, ) -> Undefined
The subscribe method.
Observable.subscribe
Source§impl Observable
impl Observable
Sourcepub fn from(value: &Any) -> Observable
pub fn from(value: &Any) -> Observable
The from method.
Observable.from
Source§impl Observable
impl Observable
Sourcepub fn take_until(&self, value: &Any) -> Observable
pub fn take_until(&self, value: &Any) -> Observable
The takeUntil method.
Observable.takeUntil
Source§impl Observable
impl Observable
Sourcepub fn map(&self, mapper: &Function) -> Observable
pub fn map(&self, mapper: &Function) -> Observable
The map method.
Observable.map
Source§impl Observable
impl Observable
Sourcepub fn filter(&self, predicate: &Function) -> Observable
pub fn filter(&self, predicate: &Function) -> Observable
The filter method.
Observable.filter
Source§impl Observable
impl Observable
Sourcepub fn take(&self, amount: u64) -> Observable
pub fn take(&self, amount: u64) -> Observable
The take method.
Observable.take
Source§impl Observable
impl Observable
Sourcepub fn drop(&self, amount: u64) -> Observable
pub fn drop(&self, amount: u64) -> Observable
The drop method.
Observable.drop
Source§impl Observable
impl Observable
Sourcepub fn flat_map(&self, mapper: &Function) -> Observable
pub fn flat_map(&self, mapper: &Function) -> Observable
The flatMap method.
Observable.flatMap
Source§impl Observable
impl Observable
Sourcepub fn switch_map(&self, mapper: &Function) -> Observable
pub fn switch_map(&self, mapper: &Function) -> Observable
The switchMap method.
Observable.switchMap
Source§impl Observable
impl Observable
Sourcepub fn inspect(&self) -> Observable
pub fn inspect(&self) -> Observable
The inspect method.
Observable.inspect
Source§impl Observable
impl Observable
Sourcepub fn inspect_with_inspector_union(&self, inspector_union: &Any) -> Observable
pub fn inspect_with_inspector_union(&self, inspector_union: &Any) -> Observable
The inspect method.
Observable.inspect
Source§impl Observable
impl Observable
Sourcepub fn catch(&self, callback: &Function) -> Observable
pub fn catch(&self, callback: &Function) -> Observable
The catch method.
Observable.catch
Source§impl Observable
impl Observable
Sourcepub fn finally(&self, callback: &Function) -> Observable
pub fn finally(&self, callback: &Function) -> Observable
The finally method.
Observable.finally
Source§impl Observable
impl Observable
Sourcepub fn to_array(&self) -> Promise<TypedArray<Any>>
pub fn to_array(&self) -> Promise<TypedArray<Any>>
The toArray method.
Observable.toArray
Source§impl Observable
impl Observable
Sourcepub fn to_array_with_options(
&self,
options: &SubscribeOptions,
) -> Promise<TypedArray<Any>>
pub fn to_array_with_options( &self, options: &SubscribeOptions, ) -> Promise<TypedArray<Any>>
The toArray method.
Observable.toArray
Source§impl Observable
impl Observable
Source§impl Observable
impl Observable
Sourcepub fn for_each_with_options(
&self,
callback: &Function,
options: &SubscribeOptions,
) -> Promise<Undefined>
pub fn for_each_with_options( &self, callback: &Function, options: &SubscribeOptions, ) -> Promise<Undefined>
The forEach method.
Observable.forEach
Source§impl Observable
impl Observable
Source§impl Observable
impl Observable
Sourcepub fn every_with_options(
&self,
predicate: &Function,
options: &SubscribeOptions,
) -> Promise<bool>
pub fn every_with_options( &self, predicate: &Function, options: &SubscribeOptions, ) -> Promise<bool>
The every method.
Observable.every
Source§impl Observable
impl Observable
Sourcepub fn first(&self) -> Promise<Any>
pub fn first(&self) -> Promise<Any>
The first method.
Observable.first
Source§impl Observable
impl Observable
Sourcepub fn first_with_options(&self, options: &SubscribeOptions) -> Promise<Any>
pub fn first_with_options(&self, options: &SubscribeOptions) -> Promise<Any>
The first method.
Observable.first
Source§impl Observable
impl Observable
Sourcepub fn last(&self) -> Promise<Any>
pub fn last(&self) -> Promise<Any>
The last method.
Observable.last
Source§impl Observable
impl Observable
Sourcepub fn last_with_options(&self, options: &SubscribeOptions) -> Promise<Any>
pub fn last_with_options(&self, options: &SubscribeOptions) -> Promise<Any>
The last method.
Observable.last
Source§impl Observable
impl Observable
Source§impl Observable
impl Observable
Sourcepub fn find_with_options(
&self,
predicate: &Function,
options: &SubscribeOptions,
) -> Promise<Any>
pub fn find_with_options( &self, predicate: &Function, options: &SubscribeOptions, ) -> Promise<Any>
The find method.
Observable.find
Source§impl Observable
impl Observable
Source§impl Observable
impl Observable
Sourcepub fn some_with_options(
&self,
predicate: &Function,
options: &SubscribeOptions,
) -> Promise<bool>
pub fn some_with_options( &self, predicate: &Function, options: &SubscribeOptions, ) -> Promise<bool>
The some method.
Observable.some
Source§impl Observable
impl Observable
Source§impl Observable
impl Observable
Sourcepub fn reduce_with_initial_value(
&self,
reducer: &Function,
initial_value: &Any,
) -> Promise<Any>
pub fn reduce_with_initial_value( &self, reducer: &Function, initial_value: &Any, ) -> Promise<Any>
The reduce method.
Observable.reduce
Source§impl Observable
impl Observable
Sourcepub fn reduce_with_initial_value_and_options(
&self,
reducer: &Function,
initial_value: &Any,
options: &SubscribeOptions,
) -> Promise<Any>
pub fn reduce_with_initial_value_and_options( &self, reducer: &Function, initial_value: &Any, options: &SubscribeOptions, ) -> Promise<Any>
The reduce method.
Observable.reduce
Methods from Deref<Target = Any>§
Sourcepub fn has_own_property(&self, prop: &str) -> bool
pub fn has_own_property(&self, prop: &str) -> bool
Checks whether a non-inherited property prop exists
Sourcepub fn at<T>(&self, idx: T) -> Val
pub fn at<T>(&self, idx: T) -> Val
Gets the element at index idx. Assumes the underlying js type is indexable
Sourcepub fn to_vec<V>(&self) -> Vec<V>where
V: FromVal,
pub fn to_vec<V>(&self) -> Vec<V>where
V: FromVal,
Converts the underlying js array to a Vec of V
Sourcepub fn call(&self, f: &str, args: &[Val]) -> Val
pub fn call(&self, f: &str, args: &[Val]) -> Val
Calls the method f with args, can return an undefined js value
Sourcepub fn new(&self, args: &[Val]) -> Val
pub fn new(&self, args: &[Val]) -> Val
Calls the object’s constructor with args constructing a new object
Sourcepub fn invoke(&self, args: &[Val]) -> Val
pub fn invoke(&self, args: &[Val]) -> Val
Invokes the function object with args, can return an undefined js value
Sourcepub fn instanceof(&self, v: Val) -> bool
pub fn instanceof(&self, v: Val) -> bool
Checks whether this Val is an instanceof v
pub fn is_number(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_undefined(&self) -> bool
pub fn is_error(&self) -> bool
pub fn is_function(&self) -> bool
pub fn as_<T>(&self) -> Twhere
T: FromVal,
Trait Implementations§
Source§impl AsMut<Val> for Observable
impl AsMut<Val> for Observable
Source§impl AsRef<Val> for Observable
impl AsRef<Val> for Observable
Source§impl Clone for Observable
impl Clone for Observable
Source§fn clone(&self) -> Observable
fn clone(&self) -> Observable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Observable
impl Debug for Observable
Source§impl Deref for Observable
impl Deref for Observable
Source§impl DerefMut for Observable
impl DerefMut for Observable
Source§impl DynCast for Observable
impl DynCast for Observable
Source§fn instanceof(val: &Any) -> bool
fn instanceof(val: &Any) -> bool
val instanceof ThisType.Source§fn unchecked_from_val(v: Any) -> Self
fn unchecked_from_val(v: Any) -> Self
Val into Self.Source§fn unchecked_from_val_ref(v: &Any) -> &Self
fn unchecked_from_val_ref(v: &Any) -> &Self
&Val into &Self.Source§fn unchecked_from_val_mut(v: &mut Any) -> &mut Self
fn unchecked_from_val_mut(v: &mut Any) -> &mut Self
&mut Val into &mut Self.fn has_type<T>(&self) -> boolwhere
T: DynCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: DynCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: DynCast,
fn dyn_mut<T>(&mut self) -> Option<&mut T>where
T: DynCast,
fn unchecked_into<T>(self) -> Twhere
T: DynCast,
fn unchecked_ref<T>(&self) -> &Twhere
T: DynCast,
fn unchecked_mut<T>(&mut self) -> &mut Twhere
T: DynCast,
fn is_instance_of<T>(&self) -> boolwhere
T: DynCast,
Source§fn is_type_of(val: &Val) -> bool
fn is_type_of(val: &Val) -> bool
instanceof.