pub struct StoreState {
pub phase: StorePhase,
pub products: Vec<Product>,
pub owned: BTreeSet<String>,
pub error: Option<String>,
pub busy: bool,
}Expand description
Snapshot of everything known about the store right now.
Fields§
§phase: StorePhaseHow far along the connection is.
products: Vec<Product>Products the backend was configured with and the store answered for. A configured product missing here is one the store does not know — usually a typo in the id, or a product not yet approved.
owned: BTreeSet<String>Product ids the account currently owns. For non-consumables and subscriptions this is the entitlement; consumables never appear.
error: Option<String>Last error reported by the store, for diagnostics. A store being briefly unreachable is normal and not worth showing to the user.
busy: boolTrue while a purchase or restore the user asked for is still running, so the UI can disable the buy button and show a spinner.
Implementations§
Trait Implementations§
Source§impl Clone for StoreState
impl Clone for StoreState
Source§fn clone(&self) -> StoreState
fn clone(&self) -> StoreState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StoreState
impl Debug for StoreState
Source§impl Default for StoreState
impl Default for StoreState
Source§fn default() -> StoreState
fn default() -> StoreState
Returns the “default value” for a type. Read more
impl Eq for StoreState
Source§impl PartialEq for StoreState
impl PartialEq for StoreState
impl StructuralPartialEq for StoreState
Auto Trait Implementations§
impl Freeze for StoreState
impl RefUnwindSafe for StoreState
impl Send for StoreState
impl Sync for StoreState
impl Unpin for StoreState
impl UnsafeUnpin for StoreState
impl UnwindSafe for StoreState
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