pub(crate) struct ProdSettingsFacade {
workspace: Weak<Workspace>,
}Fields§
§workspace: Weak<Workspace>Implementations§
Source§impl ProdSettingsFacade
impl ProdSettingsFacade
pub(crate) fn from_arc(workspace: &Arc<Workspace>) -> Arc<dyn SettingsFacade> ⓘ
fn workspace(&self) -> Result<Arc<Workspace>, SettingsError>
Sourceasync fn write(
&self,
caller: &SessionSlot,
items: Vec<SettingsSetItem>,
unset: bool,
) -> Result<SettingsWriteOutcome, SettingsError>
async fn write( &self, caller: &SessionSlot, items: Vec<SettingsSetItem>, unset: bool, ) -> Result<SettingsWriteOutcome, SettingsError>
One write, from the catalogue check through the reader’s decision to the validated writer. The whole batch is checked before anything is asked: an unknown key, a wrong type, or a batch the loader would refuse - a section whose keys are mutually required, say - is refused by name with no prompt minted.
Trait Implementations§
Source§impl SettingsFacade for ProdSettingsFacade
impl SettingsFacade for ProdSettingsFacade
Source§fn index<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
) -> Pin<Box<dyn Future<Output = Result<String, SettingsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn index<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
) -> Pin<Box<dyn Future<Output = Result<String, SettingsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The compact catalogue: keys, types, state and effect class, no values.
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SettingsValue, SettingsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SettingsValue, SettingsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
One key’s effective value. The caller’s own project’s keys and the
global keys read freely; another project’s key is refused by name.
Source§fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
items: Vec<SettingsSetItem>,
) -> Pin<Box<dyn Future<Output = Result<SettingsWriteOutcome, SettingsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
items: Vec<SettingsSetItem>,
) -> Pin<Box<dyn Future<Output = Result<SettingsWriteOutcome, SettingsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set one or more keys, applied as one validated save and held for the
reader’s approval.
Source§fn unset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SettingsWriteOutcome, SettingsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SettingsWriteOutcome, SettingsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Clear one key, held for the reader’s approval.
Auto Trait Implementations§
impl !RefUnwindSafe for ProdSettingsFacade
impl !UnwindSafe for ProdSettingsFacade
impl Freeze for ProdSettingsFacade
impl Send for ProdSettingsFacade
impl Sync for ProdSettingsFacade
impl Unpin for ProdSettingsFacade
impl UnsafeUnpin for ProdSettingsFacade
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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