pub enum TerminalOutcome {
Completed,
Cancelled,
Failed(EnumerationError),
}Expand description
How one enumeration ended.
Exactly one of these is delivered per accepted enumeration, after every entry that enumeration produced – with one deliberate exception: an enumeration whose receiver has been dropped emits nothing, because no observer remains to owe an outcome to.
Variants§
Completed
The directory was enumerated to exhaustion.
Every entry that satisfied the predicate has already been delivered.
Cancelled
The enumeration stopped early because it was cancelled.
Entries already queued when cancellation was observed are still delivered; cancellation discards only what had not yet been parsed.
Failed(EnumerationError)
The enumeration stopped early because it failed.
Entries delivered before the failure remain valid: a late failure truncates the listing rather than retracting it.
Implementations§
Source§impl TerminalOutcome
impl TerminalOutcome
Sourcepub const fn is_completed(&self) -> bool
pub const fn is_completed(&self) -> bool
Whether this outcome is Completed.
Sourcepub const fn failure(&self) -> Option<&EnumerationError>
pub const fn failure(&self) -> Option<&EnumerationError>
The failure, if this outcome is Failed.