pub struct Flags { /* private fields */ }Expand description
A request reads what is held and never waits for a refresh.
Implementations§
Source§impl Flags
impl Flags
Sourcepub async fn start(db: &Db, environment: &str) -> Result<Self>
pub async fn start(db: &Db, environment: &str) -> Result<Self>
Listens before it reads, so a change committed once this returns always wakes it.
pub fn evaluate(&self, subject: Subject) -> Features
pub async fn set(&self, name: &str, rule: Rule) -> Result<()>
Sourcepub fn declare_settings(&self, declared: Vec<DeclaredSetting>) -> Result<()>
pub fn declare_settings(&self, declared: Vec<DeclaredSetting>) -> Result<()>
Replaces those declared before.
pub async fn change_setting(&self, name: &str, text: &str) -> Result<()>
pub fn rules(&self) -> Vec<(String, Rule)>
pub fn settled(&self) -> Vec<Settled>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Flags
impl !UnwindSafe for Flags
impl Forget for Flags
impl Freeze for Flags
impl Send for Flags
impl Sync for Flags
impl Unpin for Flags
impl UnsafeUnpin for Flags
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