BookingResponse

Struct BookingResponse 

Source
pub struct BookingResponse<T, U>
where T: Unsigned, U: Float,
{
Show 21 fields pub id: u32, pub status: BookingStatus, pub booked_at: OffsetDateTime, pub booked_by: String, pub created_at: OffsetDateTime, pub updated_at: OffsetDateTime, pub declared_value: U, pub insured_value: U, pub description: Option<String>, pub items: Vec<Product<T, U>>, pub label: String, pub notifications: HashMap<String, bool>, pub quotes: HashMap<String, Service<U>>, pub sender: Account, pub receiver: Account, pub pickup_window: Vec<String>, pub connote: Option<String>, pub charged_weight: T, pub scanned_weight: T, pub special_instructions: String, pub tailgate_delivery: bool,
}
Expand description

Represents a response due to a booking request from the server

Fields§

§id: u32§status: BookingStatus§booked_at: OffsetDateTime§booked_by: String§created_at: OffsetDateTime§updated_at: OffsetDateTime§declared_value: U§insured_value: U§description: Option<String>§items: Vec<Product<T, U>>§label: String§notifications: HashMap<String, bool>§quotes: HashMap<String, Service<U>>§sender: Account§receiver: Account§pickup_window: Vec<String>§connote: Option<String>§charged_weight: T§scanned_weight: T§special_instructions: String§tailgate_delivery: bool

Trait Implementations§

Source§

impl<T, U> Debug for BookingResponse<T, U>
where T: Unsigned + Debug, U: Float + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, T, U> Deserialize<'de> for BookingResponse<T, U>
where T: Unsigned + Deserialize<'de>, U: Float + Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T, U> RestPath<u32> for BookingResponse<T, U>
where T: Unsigned, U: Float,

Source§

fn get_path(params: u32) -> Result<String, RestsonError>

Construct type specific REST API path from given parameters (e.g. “api/devices/1234”).

Auto Trait Implementations§

§

impl<T, U> Freeze for BookingResponse<T, U>
where U: Freeze, T: Freeze,

§

impl<T, U> RefUnwindSafe for BookingResponse<T, U>

§

impl<T, U> Send for BookingResponse<T, U>
where U: Send, T: Send,

§

impl<T, U> Sync for BookingResponse<T, U>
where U: Sync, T: Sync,

§

impl<T, U> Unpin for BookingResponse<T, U>
where U: Unpin, T: Unpin,

§

impl<T, U> UnwindSafe for BookingResponse<T, U>
where U: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,