pub struct Settings { /* private fields */ }Expand description
Every setting of one tenant.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn stored(rows: &[(String, String)]) -> Option<Settings>
pub fn stored(rows: &[(String, String)]) -> Option<Settings>
The settings a tenant’s stored rows (name, value) make over the defaults. None for damage: a name outside the list or stored twice, a value its name does not read, or an idle limit above the absolute one.
Sourcepub fn changed(
&self,
change: &Value,
) -> Result<(Settings, Vec<Change>), SettingError>
pub fn changed( &self, change: &Value, ) -> Result<(Settings, Vec<Change>), SettingError>
These settings after a change: a JSON object of names, each with its new value or null for its default. Also gives the rows to write and remove, in the list’s order. Nothing of a refused change is taken.
§Errors
A SettingError for a change that is not an object, names a
setting outside the list, gives a value of the wrong kind or a limit
outside its bounds, or would leave the idle limit above the absolute
one.
Trait Implementations§
impl Copy for Settings
impl Eq for Settings
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Forget for Settings
impl Freeze for Settings
impl Move for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreCreates a shared type from an unshared type.