pub enum CaptureFlow {
Pass,
Consumed,
ConsumedPop,
}Expand description
What a capture handler did with an event it was offered.
The return value is authoritative for routing — handlers must not rely
on Event::clear to signal “consumed” to the capture stack (clearing is a
separate downstream concern handled by normal view routing).
§Turbo Vision heritage
Makes explicit the consumed-vs-passed convention that Turbo Vision encodes
implicitly by clearing the event in place (tview.cpp); the self-removing
ConsumedPop variant replaces a nested modal
loop returning from its execute (deviation D9).
Variants§
Pass
Did not handle the event — offer it to the next (lower) handler, and then to normal view-tree routing if every handler passes.
Consumed
Handled the event; stop routing. The handler stays on the stack.
ConsumedPop
Handled the event and removes ITSELF from the stack (e.g. a modal dialog closing). Unambiguous: “pop” always means the handler that just ran.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CaptureFlow
impl RefUnwindSafe for CaptureFlow
impl Send for CaptureFlow
impl Sync for CaptureFlow
impl Unpin for CaptureFlow
impl UnsafeUnpin for CaptureFlow
impl UnwindSafe for CaptureFlow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.