Function rxrust::observable::from_fn::create[][src]

pub fn create<F, Item, Err>(subscribe: F) -> ObservableFn<F, Item, Err> where
    F: FnOnce(&mut dyn Observer<Item = Item, Err = Err>), 
Expand description

param subscribe: the function that is called when the Observable is initially subscribed to. This function is given a Subscriber, to which new values can be nexted, or an error method can be called to raise an error, or complete can be called to notify of a successful completion.