[−][src]Struct lightproc::lightproc::LightProc
Struct to create and operate lightweight processes
Methods
impl LightProc
[src]
pub fn recoverable<F, R, S>(
future: F,
schedule: S,
stack: ProcStack
) -> (LightProc, RecoverableHandle<R>) where
F: Future<Output = R> + Send + 'static,
R: Send + 'static,
S: Fn(LightProc) + Send + Sync + 'static,
[src]
future: F,
schedule: S,
stack: ProcStack
) -> (LightProc, RecoverableHandle<R>) where
F: Future<Output = R> + Send + 'static,
R: Send + 'static,
S: Fn(LightProc) + Send + Sync + 'static,
Creates a recoverable process which will signal occurred panic back to the poller.
Example
// ... creating a recoverable process let panic_recoverable = LightProc::recoverable( future, schedule_function, proc_stack );
pub fn build<F, R, S>(
future: F,
schedule: S,
stack: ProcStack
) -> (LightProc, ProcHandle<R>) where
F: Future<Output = R> + Send + 'static,
R: Send + 'static,
S: Fn(LightProc) + Send + Sync + 'static,
[src]
future: F,
schedule: S,
stack: ProcStack
) -> (LightProc, ProcHandle<R>) where
F: Future<Output = R> + Send + 'static,
R: Send + 'static,
S: Fn(LightProc) + Send + Sync + 'static,
Creates a standard process which will stop it's execution on occurrence of panic.
Example
// ... creating a standard process let standard = LightProc::build( future, schedule_function, proc_stack );
pub fn schedule(self)
[src]
Schedule the lightweight process with passed schedule
function at the build time.
pub fn run(self)
[src]
Schedule the lightproc for runnning on the thread.
pub fn cancel(&self)
[src]
Cancel polling the lightproc's inner future, thus cancelling th proc itself.
pub fn stack(&self) -> &ProcStack
[src]
Gives a reference to given ProcStack when building the light proc.
Trait Implementations
impl Debug for LightProc
[src]
impl Drop for LightProc
[src]
impl Send for LightProc
[src]
impl Sync for LightProc
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> State for T where
T: Send + Sync + 'static,
[src]
T: Send + Sync + 'static,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,