pub enum ReservationStatus {
Pending,
Reserved,
Canceled,
Failed,
NoShow,
Fulfilled,
Rejected,
Unknown,
}bookings and v2_3_0 only.Expand description
The state of a booking.
Spec: 2.3.0-bookings §mod_bookings_reservation_status_enum
Variants§
Pending
Pending processing by the CPO. The initial state.
Wire value: PENDING
Reserved
Accepted by the CPO.
Wire value: RESERVED
Canceled
Canceled.
Wire value: CANCELED
Failed
The request failed with an error.
Wire value: FAILED
NoShow
Nobody showed up within the no-show window.
Wire value: NO_SHOW
Fulfilled
A session was started with the communicated token before the booking expired.
Wire value: FULFILLED
Rejected
Rejected after processing, e.g. because the requested slot was unavailable.
Wire value: REJECTED
Unknown
Any other or unknown state.
Wire value: UNKNOWN
Implementations§
Source§impl ReservationStatus
impl ReservationStatus
Sourcepub const ALL_WIRE: &'static [&'static str]
pub const ALL_WIRE: &'static [&'static str]
Every wire value this enum accepts, in declaration order.
Sourcepub fn from_str_ignore_case(s: &str) -> Option<Self>
pub fn from_str_ignore_case(s: &str) -> Option<Self>
Parses a wire value, ignoring ASCII case.
OCPI enum values are case-sensitive, so this is only for peers known to get the
case wrong; FromStr is the strict version.
Source§impl ReservationStatus
impl ReservationStatus
Sourcepub const fn is_terminal(self) -> bool
pub const fn is_terminal(self) -> bool
Whether the booking can still change.
Sourcepub const fn can_transition_to(self, next: Self) -> bool
pub const fn can_transition_to(self, next: Self) -> bool
Whether next is a state this booking may move to.
A Booking starts in a
PENDINGstate when initially requested by the eMSP. … FromRESERVED, the Booking can transition toFULFILLED,CANCELEDorNO_SHOW.
Spec: 2.3.0-bookings §mod_bookings_bookings_module
Trait Implementations§
Source§impl Clone for ReservationStatus
impl Clone for ReservationStatus
Source§fn clone(&self) -> ReservationStatus
fn clone(&self) -> ReservationStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReservationStatus
Source§impl Debug for ReservationStatus
impl Debug for ReservationStatus
Source§impl<'de> Deserialize<'de> for ReservationStatus
impl<'de> Deserialize<'de> for ReservationStatus
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl Display for ReservationStatus
impl Display for ReservationStatus
impl Eq for ReservationStatus
Source§impl FromStr for ReservationStatus
impl FromStr for ReservationStatus
Source§impl Hash for ReservationStatus
impl Hash for ReservationStatus
Source§impl JsonSchema for ReservationStatus
impl JsonSchema for ReservationStatus
Source§fn json_schema(_g: &mut SchemaGenerator) -> Schema
fn json_schema(_g: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for ReservationStatus
impl Ord for ReservationStatus
Source§fn cmp(&self, other: &ReservationStatus) -> Ordering
fn cmp(&self, other: &ReservationStatus) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ReservationStatus
impl PartialEq for ReservationStatus
Source§impl PartialOrd for ReservationStatus
impl PartialOrd for ReservationStatus
Source§impl Serialize for ReservationStatus
impl Serialize for ReservationStatus
impl StructuralPartialEq for ReservationStatus
Source§impl Validate for ReservationStatus
impl Validate for ReservationStatus
Auto Trait Implementations§
impl Freeze for ReservationStatus
impl RefUnwindSafe for ReservationStatus
impl Send for ReservationStatus
impl Sync for ReservationStatus
impl Unpin for ReservationStatus
impl UnsafeUnpin for ReservationStatus
impl UnwindSafe for ReservationStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.