aws_smithy_runtime_api/client/interceptors/context/
phase.rs1#[derive(Debug)]
7#[non_exhaustive]
8pub(crate) enum Phase {
9 BeforeSerialization,
11 Serialization,
13 BeforeTransmit,
15 Transmit,
17 BeforeDeserialization,
19 Deserialization,
21 AfterDeserialization,
23}
24
25impl Phase {
26 pub(crate) fn is_before_serialization(&self) -> bool {
27 matches!(self, Self::BeforeSerialization)
28 }
29
30 pub(crate) fn is_serialization(&self) -> bool {
31 matches!(self, Self::Serialization)
32 }
33
34 pub(crate) fn is_before_transmit(&self) -> bool {
35 matches!(self, Self::BeforeTransmit)
36 }
37
38 pub(crate) fn is_transmit(&self) -> bool {
39 matches!(self, Self::Transmit)
40 }
41
42 pub(crate) fn is_before_deserialization(&self) -> bool {
43 matches!(self, Self::BeforeDeserialization)
44 }
45
46 pub(crate) fn is_deserialization(&self) -> bool {
47 matches!(self, Self::Deserialization)
48 }
49
50 pub(crate) fn is_after_deserialization(&self) -> bool {
51 matches!(self, Self::AfterDeserialization)
52 }
53}