pub struct Request<RequestState: RequestStateTrait = UninitializedRequestState> {
pub state_data: RequestState::Data,
/* private fields */
}Fields§
§state_data: RequestState::DataImplementations§
Source§impl<RequestState: RequestStateTrait> Request<RequestState>
impl<RequestState: RequestStateTrait> Request<RequestState>
pub fn transition_map<N, F>(self, f: F) -> Request<N>where
N: RequestStateTrait + StateMarker,
Self: DeclaredTransitionMapEdge<N>,
F: FnOnce(<Self as DeclaredTransitionMapEdge<N>>::CurrentData) -> <N as StateMarker>::Data,
Source§impl Request<PolicyAttached>
impl Request<PolicyAttached>
Source§impl Request<Intake>
impl Request<Intake>
Sourcepub fn attach_pet_profile(
self,
name: Name,
completeness: PetProfileCompleteness,
) -> Request<PetProfileAttached>
pub fn attach_pet_profile( self, name: Name, completeness: PetProfileCompleteness, ) -> Request<PetProfileAttached>
Attaches pet profile evidence before the request can move to policy decisioning.
Source§impl Request<PetProfileAttached>
impl Request<PetProfileAttached>
Sourcepub fn attach_policy_snapshot(
self,
policy_snapshot: PolicySnapshot,
) -> Request<PolicyAttached>
pub fn attach_policy_snapshot( self, policy_snapshot: PolicySnapshot, ) -> Request<PolicyAttached>
Attaches policy snapshot evidence before the request can move to policy decisioning.
Source§impl Request<PolicyAttached>
impl Request<PolicyAttached>
Sourcepub fn mark_ready_for_policy_decision(self) -> Request<ReadyForPolicyDecision>
pub fn mark_ready_for_policy_decision(self) -> Request<ReadyForPolicyDecision>
Marks the packet as ready for policy decision once required evidence has been attached.
Source§impl<S: RequestStateTrait> Request<S>
impl<S: RequestStateTrait> Request<S>
Sourcepub fn reservation(&self) -> &Reservation
pub fn reservation(&self) -> &Reservation
Returns the reservation carried by this booking-readiness workflow value.
Trait Implementations§
Source§impl CanTransitionMap<PetProfileAttached> for Request<Intake>
impl CanTransitionMap<PetProfileAttached> for Request<Intake>
Source§type CurrentData = <Request<Intake> as DeclaredTransitionMapEdge<PetProfileAttached>>::CurrentData
type CurrentData = <Request<Intake> as DeclaredTransitionMapEdge<PetProfileAttached>>::CurrentData
The payload type stored in the current state.
Source§type Output = Request<PetProfileAttached>
type Output = Request<PetProfileAttached>
The transition result type.
Source§fn transition_map<F>(self, f: F) -> Self::Outputwhere
F: FnOnce(Self::CurrentData) -> <PetProfileAttached as StateMarker>::Data,
fn transition_map<F>(self, f: F) -> Self::Outputwhere
F: FnOnce(Self::CurrentData) -> <PetProfileAttached as StateMarker>::Data,
Perform the transition by consuming the current state data and producing the next payload.
Source§impl CanTransitionMap<PolicyAttached> for Request<PetProfileAttached>
impl CanTransitionMap<PolicyAttached> for Request<PetProfileAttached>
Source§type CurrentData = <Request<PetProfileAttached> as DeclaredTransitionMapEdge<PolicyAttached>>::CurrentData
type CurrentData = <Request<PetProfileAttached> as DeclaredTransitionMapEdge<PolicyAttached>>::CurrentData
The payload type stored in the current state.
Source§type Output = Request<PolicyAttached>
type Output = Request<PolicyAttached>
The transition result type.
Source§fn transition_map<F>(self, f: F) -> Self::Outputwhere
F: FnOnce(Self::CurrentData) -> <PolicyAttached as StateMarker>::Data,
fn transition_map<F>(self, f: F) -> Self::Outputwhere
F: FnOnce(Self::CurrentData) -> <PolicyAttached as StateMarker>::Data,
Perform the transition by consuming the current state data and producing the next payload.
Source§impl CanTransitionMap<ReadyForPolicyDecision> for Request<PolicyAttached>
impl CanTransitionMap<ReadyForPolicyDecision> for Request<PolicyAttached>
Source§type CurrentData = <Request<PolicyAttached> as DeclaredTransitionMapEdge<ReadyForPolicyDecision>>::CurrentData
type CurrentData = <Request<PolicyAttached> as DeclaredTransitionMapEdge<ReadyForPolicyDecision>>::CurrentData
The payload type stored in the current state.
Source§type Output = Request<ReadyForPolicyDecision>
type Output = Request<ReadyForPolicyDecision>
The transition result type.
Source§fn transition_map<F>(self, f: F) -> Self::Outputwhere
F: FnOnce(Self::CurrentData) -> <ReadyForPolicyDecision as StateMarker>::Data,
fn transition_map<F>(self, f: F) -> Self::Outputwhere
F: FnOnce(Self::CurrentData) -> <ReadyForPolicyDecision as StateMarker>::Data,
Perform the transition by consuming the current state data and producing the next payload.
Source§impl CanTransitionWith<PetProfile> for Request<Intake>
impl CanTransitionWith<PetProfile> for Request<Intake>
Source§type NextState = PetProfileAttached
type NextState = PetProfileAttached
The next state selected by this transition.
Source§type Output = Request<PetProfileAttached>
type Output = Request<PetProfileAttached>
The transition result type.
Source§fn transition_with_data(self, data: PetProfile) -> Self::Output
fn transition_with_data(self, data: PetProfile) -> Self::Output
Perform the transition with payload data.
Source§impl CanTransitionWith<PolicyAttachedData> for Request<PetProfileAttached>
impl CanTransitionWith<PolicyAttachedData> for Request<PetProfileAttached>
Source§type NextState = PolicyAttached
type NextState = PolicyAttached
The next state selected by this transition.
Source§type Output = Request<PolicyAttached>
type Output = Request<PolicyAttached>
The transition result type.
Source§fn transition_with_data(self, data: PolicyAttachedData) -> Self::Output
fn transition_with_data(self, data: PolicyAttachedData) -> Self::Output
Perform the transition with payload data.
Source§impl CanTransitionWith<PolicyAttachedData> for Request<PolicyAttached>
impl CanTransitionWith<PolicyAttachedData> for Request<PolicyAttached>
Source§type NextState = ReadyForPolicyDecision
type NextState = ReadyForPolicyDecision
The next state selected by this transition.
Source§type Output = Request<ReadyForPolicyDecision>
type Output = Request<ReadyForPolicyDecision>
The transition result type.
Source§fn transition_with_data(self, data: PolicyAttachedData) -> Self::Output
fn transition_with_data(self, data: PolicyAttachedData) -> Self::Output
Perform the transition with payload data.
impl<RequestState: Eq + RequestStateTrait> Eq for Request<RequestState>
impl<RequestState: RequestStateTrait> StructuralPartialEq for Request<RequestState>
Auto Trait Implementations§
impl<RequestState> Freeze for Request<RequestState>
impl<RequestState> RefUnwindSafe for Request<RequestState>
impl<RequestState> Send for Request<RequestState>
impl<RequestState> Sync for Request<RequestState>
impl<RequestState> Unpin for Request<RequestState>
impl<RequestState> UnsafeUnpin for Request<RequestState>
impl<RequestState> UnwindSafe for Request<RequestState>
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
Mutably borrows from an owned value. Read more