Struct salak::Salak [−][src]
A wrapper for Environment
, which can hide the implementation details.
Implementations
impl Salak
[src]
pub fn new() -> SalakBuilder
[src]
Register property source at last.
pub fn register_source(&mut self, ps: Box<dyn PropertySource>)
[src]
Create default builder.
pub fn register_sources(&mut self, sources: Vec<Box<dyn PropertySource>>)
[src]
Register property sources at last.
Trait Implementations
impl Default for Salak
[src]
impl Environment for Salak
[src]
fn contains(&self, name: &str) -> bool
[src]
fn require<T>(&self, name: &str) -> Result<T, PropertyError> where
T: FromEnvironment,
[src]
T: FromEnvironment,
fn resolve_placeholder(
&self,
value: String
) -> Result<Option<Property>, PropertyError>
[src]
&self,
value: String
) -> Result<Option<Property>, PropertyError>
fn find_keys(&self, prefix: &str) -> Vec<String>
[src]
fn reload(&mut self) -> Result<(), PropertyError>
[src]
fn require_or<T: FromEnvironment>(
&self,
key: &str,
default: T
) -> Result<T, PropertyError>
[src]
&self,
key: &str,
default: T
) -> Result<T, PropertyError>
fn get<T: FromEnvironment>(&self, key: &str) -> Option<T>
[src]
fn get_or<T: FromEnvironment>(&self, key: &str, default: T) -> T
[src]
fn load_config<T: DefaultSourceFromEnvironment>(
&self
) -> Result<T, PropertyError>
[src]
&self
) -> Result<T, PropertyError>
Auto Trait Implementations
impl !RefUnwindSafe for Salak
impl Send for Salak
impl Sync for Salak
impl Unpin for Salak
impl !UnwindSafe for Salak
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,