pub struct ConfigReader<'a> { /* private fields */ }Expand description
設定を読む補助。知らない名前を残さないよう、読んだ名前を覚えて ConfigReader::finish で確かめる
Implementations§
Source§impl<'a> ConfigReader<'a>
impl<'a> ConfigReader<'a>
pub fn new(cfg: &'a Config) -> Self
Sourcepub fn opt_num(&mut self, key: &str) -> Result<Option<f64>>
pub fn opt_num(&mut self, key: &str) -> Result<Option<f64>>
数(省けば None)。NaN は「省略」の印にせず誤り(省くときは書かない)
Sourcepub fn nums(&mut self, key: &str) -> Result<Option<Vec<f64>>>
pub fn nums(&mut self, key: &str) -> Result<Option<Vec<f64>>>
数の並び(省けば None)。数 1 つも長さ 1 の並びとして受ける
Sourcepub fn opt_count(&mut self, key: &str) -> Result<Option<usize>>
pub fn opt_count(&mut self, key: &str) -> Result<Option<usize>>
0 以上の整数(省けば None。NaN を「省略」の印にしない)
Auto Trait Implementations§
impl<'a> Freeze for ConfigReader<'a>
impl<'a> RefUnwindSafe for ConfigReader<'a>
impl<'a> Send for ConfigReader<'a>
impl<'a> Sync for ConfigReader<'a>
impl<'a> Unpin for ConfigReader<'a>
impl<'a> UnsafeUnpin for ConfigReader<'a>
impl<'a> UnwindSafe for ConfigReader<'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
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