pub struct ConfigView<'a> { /* private fields */ }Expand description
Borrowed typed accessors over one config table.
Implementations§
Source§impl<'a> ConfigView<'a>
impl<'a> ConfigView<'a>
Sourcepub fn new(table: &'a ConfigTable) -> Self
pub fn new(table: &'a ConfigTable) -> Self
Creates a view over table.
Sourcepub fn required_string(&self, key: &str) -> ConfigResult<&'a str>
pub fn required_string(&self, key: &str) -> ConfigResult<&'a str>
Reads a required string field.
Sourcepub fn required_bool(&self, key: &str) -> ConfigResult<bool>
pub fn required_bool(&self, key: &str) -> ConfigResult<bool>
Reads a required boolean field.
Sourcepub fn required_i64(&self, key: &str) -> ConfigResult<i64>
pub fn required_i64(&self, key: &str) -> ConfigResult<i64>
Reads a required integer field.
Trait Implementations§
Source§impl<'a> Clone for ConfigView<'a>
impl<'a> Clone for ConfigView<'a>
Source§fn clone(&self) -> ConfigView<'a>
fn clone(&self) -> ConfigView<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ConfigView<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConfigView<'a>
impl<'a> RefUnwindSafe for ConfigView<'a>
impl<'a> Send for ConfigView<'a>
impl<'a> Sync for ConfigView<'a>
impl<'a> Unpin for ConfigView<'a>
impl<'a> UnsafeUnpin for ConfigView<'a>
impl<'a> UnwindSafe for ConfigView<'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