1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use crate::Flow;

mod recoverable;
mod request_hint;
mod sequence;
mod tag;
mod value;

pub use recoverable::*;
pub use request_hint::*;
pub use sequence::*;
pub use tag::*;
pub use value::*;

#[derive(Debug, Copy, Clone, PartialEq)]
pub enum VisitResult<S> {
    /// The protocol was not used.
    ///
    /// This either means the visitor doesn't support the protocol at all, or
    /// it didn't want to use the protocol right now.
    Skipped(S),

    /// How control flow should proceed.
    Control(Flow),
}

impl<S> From<Flow> for VisitResult<S> {
    fn from(value: Flow) -> Self {
        Self::Control(value)
    }
}