pub struct KeptViews {
pub kept_views: Vec<KeptView>,
}Expand description
The query views a person kept in one app, oldest first.
Fields§
§kept_views: Vec<KeptView>Implementations§
Source§impl KeptViews
impl KeptViews
Sourcepub fn keep(&mut self, query: &QuerySpec, name: impl Into<String>) -> String
pub fn keep(&mut self, query: &QuerySpec, name: impl Into<String>) -> String
Keep query as a view named name, and return its id. A query kept
already is not kept twice: its id comes back.
pub fn get(&self, id: &str) -> Option<&KeptView>
Sourcepub fn forget(&mut self, id: &str) -> bool
pub fn forget(&mut self, id: &str) -> bool
Stop keeping the view id. Returns whether it was kept.
Sourcepub fn rename(&mut self, id: &str, name: &str) -> bool
pub fn rename(&mut self, id: &str, name: &str) -> bool
Call the view id name; a blank name changes nothing.
Sourcepub fn default_name(query: &QuerySpec, kinds: &[KindDecl]) -> String
pub fn default_name(query: &QuerySpec, kinds: &[KindDecl]) -> String
The name a view of query starts with: what was typed, then its
chips as they read (“ada”, “Liked”).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeptViews
impl<'de> Deserialize<'de> for KeptViews
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 SettingsSchema for KeptViews
impl SettingsSchema for KeptViews
const SCOPE: Scope = Scope::Personal
§const APP: Option<&'static str> = None
const APP: Option<&'static str> = None
The app whose own settings these are when another app keeps them
for it, as Settings keeps the on-screen keyboard’s layouts: a
Scope::Personal or Scope::DeviceLocal value is that app’s,
whichever app reads or writes it. None: the app that holds them.§fn defaults_on(device: DeviceClass) -> Self
fn defaults_on(device: DeviceClass) -> Self
What a person who changed nothing has on a
device: Default
everywhere, unless the setting costs what one class of device should
not spend unasked (a copy kept on the device, work in the
background).§fn available_on(device: DeviceClass) -> bool
fn available_on(device: DeviceClass) -> bool
Whether the setting means anything on a
device: one whose effect a
class of device cannot have (a copy kept on a device that keeps
none) is not offered there, neither shown nor published.§fn from_settings_value(value: Value) -> Result<Self, Error>
fn from_settings_value(value: Value) -> Result<Self, Error>
The setting
value holds, as JSON stores it. Generic code reading
a setting compiles this, and serde’s whole decoder for the type,
into each crate that names the type; a large type’s own crate can
compile it once instead with settings_codec!. Read more§fn to_settings_value(&self) -> Result<Value, Error>
fn to_settings_value(&self) -> Result<Value, Error>
The setting as JSON stores it; see
Self::from_settings_value. Read moreimpl Eq for KeptViews
impl StructuralPartialEq for KeptViews
Auto Trait Implementations§
impl Freeze for KeptViews
impl RefUnwindSafe for KeptViews
impl Send for KeptViews
impl Sync for KeptViews
impl Unpin for KeptViews
impl UnsafeUnpin for KeptViews
impl UnwindSafe for KeptViews
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.