Struct fluvio::config::ConfigFile
source · pub struct ConfigFile { /* private fields */ }
Implementations§
source§impl ConfigFile
impl ConfigFile
sourcepub fn default_config() -> Result<Self, IoError>
pub fn default_config() -> Result<Self, IoError>
create default profile
sourcepub fn load_default_or_new() -> Result<Self, IoError>
pub fn load_default_or_new() -> Result<Self, IoError>
load from default location if not found, create new one
sourcepub fn load(optional_path: Option<String>) -> Result<Self, FluvioError>
pub fn load(optional_path: Option<String>) -> Result<Self, FluvioError>
try to load from default locations
sourcepub fn mut_config(&mut self) -> &mut Config
pub fn mut_config(&mut self) -> &mut Config
Return a mutable reference to the internal Config
sourcepub fn save(&self) -> Result<(), FluvioError>
pub fn save(&self) -> Result<(), FluvioError>
Save to file
sourcepub fn add_or_replace_profile(
&mut self,
profile_name: &str,
cluster_addr: &str,
tls_policy: &TlsPolicy
) -> Result<(), FluvioError>
pub fn add_or_replace_profile( &mut self, profile_name: &str, cluster_addr: &str, tls_policy: &TlsPolicy ) -> Result<(), FluvioError>
add or update profile with a simple cluster address this will create or replace cluster config if it doesn’t exists
Auto Trait Implementations§
impl Freeze for ConfigFile
impl RefUnwindSafe for ConfigFile
impl Send for ConfigFile
impl Sync for ConfigFile
impl Unpin for ConfigFile
impl UnwindSafe for ConfigFile
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