Struct openmensa_rs::request::MealRequest [−][src]
pub struct MealRequest { /* fields omitted */ }
Expand description
Struct to create requests returning meals on a specific day in one canteen.
A list of meals is here returned all are offered at that day. For more information about the Meal
have a look at its struct.
Example
use openmensa_rs::request::MealRequest; let canteen_id = 1; let meals = MealRequest::new(canteen_id, chrono::Date::from_utc(chrono::NaiveDate::from_ymd(2019, 11, 11), chrono::Utc)) .build() .await .unwrap();
Implementations
impl MealRequest
[src]
impl MealRequest
[src]pub async fn build(self) -> Result<Vec<Meal>, RequestError>
[src]
pub async fn build(self) -> Result<Vec<Meal>, RequestError>
[src]Send the request and wait for the response. May return an error if the parameters cannot be serialized or the response cannot be deserialized.
Example
use openmensa_rs::request::MealRequest; let canteen_id = 1; let offered_meals = MealRequest::new(canteen_id, chrono::Date::from_utc(chrono::NaiveDate::from_ymd(2019, 11, 11), chrono::Utc)) .build() .await .unwrap();
Auto Trait Implementations
impl RefUnwindSafe for MealRequest
impl Send for MealRequest
impl Sync for MealRequest
impl Unpin for MealRequest
impl UnwindSafe for MealRequest
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]