pub struct FileConfigProvider { /* private fields */ }Implementations§
Source§impl FileConfigProvider
impl FileConfigProvider
pub async fn new(file_path: impl AsRef<Path>) -> Result<Self>
pub async fn with_format( file_path: impl AsRef<Path>, format: ConfigFormat, ) -> Result<Self>
pub async fn start_file_watcher(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for FileConfigProvider
impl Clone for FileConfigProvider
Source§impl ConfigProvider for FileConfigProvider
impl ConfigProvider for FileConfigProvider
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn watch<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Stream<Item = String> + Send + Unpin>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for FileConfigProvider
impl !RefUnwindSafe for FileConfigProvider
impl Send for FileConfigProvider
impl Sync for FileConfigProvider
impl Unpin for FileConfigProvider
impl !UnwindSafe for FileConfigProvider
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