pub struct MarketContext {
    pub market_id: u32,
    pub zip_code: String,
    pub service_types: MarketService,
}
Expand description

Use the MarketContext to build a simple context for the markt you selected, because the Rewe api needs this data. Go to rewe.de and select the button Choose market in the top right corner. After you choose your market you will be redirect to a URL that looks like this: https://www.rewe.de/marktseite/erfurt-rieth/2900003/rewe-markt-mainzer-str-39/. The part between your city and the street (in this example 2900003) is your market id. You can build a market context now:

let ctx = MarketContext::new(market_id, zip_code);
// in this example:
let ctx = MarketContext::new(2900003, "99089");

Fields§

§market_id: u32§zip_code: String§service_types: MarketService

Implementations§

I actually don’t know why you need a zip code, but it’s a requirement of the Rewe mobile api ServiceTypes’s default is Pickup (because you mostly need this type I guess)

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more