Skip to main content

SourceHandle

Trait SourceHandle 

Source
pub trait SourceHandle: Sealed {
    // Required methods
    fn is_terminated(&self) -> bool;
    fn terminate_by_ref(&self) -> bool;

    // Provided method
    fn terminate(self) -> bool
       where Self: Sized { ... }
}
Expand description

Defines common methods for sources.

Required Methods§

Source

fn is_terminated(&self) -> bool

Returns true if the source has stopped producing messages.

Source

fn terminate_by_ref(&self) -> bool

Terminates the source. Drop is called immediately.

Returns true if the source was terminated by this call, or false if it was already terminated.

Provided Methods§

Source

fn terminate(self) -> bool
where Self: Sized,

Terminates the source. Drop is called immediately.

Returns true if the source was terminated by this call, or false if it was already terminated.

Implementors§