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§
Sourcefn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
Returns true if the source has stopped producing messages.
Sourcefn terminate_by_ref(&self) -> bool
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.