[][src]Enum sync15::state::PersistedGlobalState

pub enum PersistedGlobalState {
    V2 {
        declined: Option<Vec<String>>,
    },
}

State that we require the app to persist to storage for us. It's a little unfortunate we need this, because it's only tracking "declined engines", and even then, only needed in practice when there's no meta/global so we need to create one. It's extra unfortunate because we want to move away from "globally declined" engines anyway, moving towards allowing engines to be enabled or disabled per client rather than globally.

Apps are expected to treat this as opaque, so we support serializing it. Note that this structure is not used to change the declined engines list - that will be done in the future, but the API exposed for that purpose will also take a mutable PersistedGlobalState.

Variants

V2

V1 was when we persisted the entire GlobalState, keys and all! V2 is just tracking the globally declined list. None means "I've no idea" and theoretically should only happen on the very first sync for an app.

Fields of V2

declined: Option<Vec<String>>

Implementations

impl PersistedGlobalState[src]

fn set_declined(&mut self, new_declined: Vec<String>)[src]

pub(crate) fn get_declined(&self) -> &[String][src]

Trait Implementations

impl Debug for PersistedGlobalState[src]

impl Default for PersistedGlobalState[src]

impl<'de> Deserialize<'de> for PersistedGlobalState[src]

impl Serialize for PersistedGlobalState[src]

Auto Trait Implementations

impl RefUnwindSafe for PersistedGlobalState

impl Send for PersistedGlobalState

impl Sync for PersistedGlobalState

impl Unpin for PersistedGlobalState

impl UnwindSafe for PersistedGlobalState

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,