pub struct Preferences<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Preferences<'a>
impl<'a> Preferences<'a>
pub async fn new<C: Into<HttpClient>>(client: C) -> Result<Preferences<'a>>
pub fn get(&self, key: &str) -> Option<&Setting>
pub fn all(&self) -> &[Setting]
pub fn set(&mut self, key: &'a str, value: Value) -> Result<&mut Self>
pub async fn commit(self) -> Result<Preferences<'a>>
Trait Implementations§
Source§impl<'a> Clone for Preferences<'a>
impl<'a> Clone for Preferences<'a>
Source§fn clone(&self) -> Preferences<'a>
fn clone(&self) -> Preferences<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> !Freeze for Preferences<'a>
impl<'a> !RefUnwindSafe for Preferences<'a>
impl<'a> Send for Preferences<'a>
impl<'a> Sync for Preferences<'a>
impl<'a> Unpin for Preferences<'a>
impl<'a> !UnwindSafe for Preferences<'a>
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