Struct fluvio_cluster::SysConfigBuilder [−][src]
Builder for SysConfig
.
Implementations
impl SysConfigBuilder
[src]
pub fn cloud<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn namespace<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn chart_location(&mut self, value: ChartLocation) -> &mut Self
[src]
The location at which to find the system chart to install
pub fn chart_version<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
impl SysConfigBuilder
[src]
pub fn build(&self) -> Result<SysConfig, SysInstallError>
[src]
Validates all builder options and constructs a SysConfig
pub fn local_chart<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self
[src]
The local chart location to install sys charts from
Example
builder.local_chart("./helm/fluvio-sys");
pub fn remote_chart<S: Into<String>>(&mut self, location: S) -> &mut Self
[src]
The remote chart location to install sys charts from
Example
builder.remote_chart("https://charts.fluvio.io");
pub fn with<F>(&mut self, f: F) -> &mut Self where
F: Fn(&mut Self) -> &mut Self,
[src]
F: Fn(&mut Self) -> &mut Self,
A builder helper for conditionally setting options
This is useful for maintaining a fluid call chain even when we only want to set certain options conditionally and the conditions are more complicated than a simple boolean.
Example
enum NamespaceCandidate { UserGiven(String), System, Default, } fn make_config(ns: NamespaceCandidate) -> Result<SysConfig, SysInstallError> { let config = SysConfig::builder("0.7.0-alpha.1") .with(|builder| match &ns { NamespaceCandidate::UserGiven(user) => builder.namespace(user), NamespaceCandidate::System => builder.namespace("system"), NamespaceCandidate::Default => builder, }) .build()?; Ok(config) }
pub fn with_if<F>(&mut self, cond: bool, f: F) -> &mut Self where
F: Fn(&mut Self) -> &mut Self,
[src]
F: Fn(&mut Self) -> &mut Self,
A builder helper for conditionally setting options
This is useful for maintaining a builder call chain even when you only want to apply some options conditionally based on a boolean value.
Example
let custom_namespace = false; let config = SysConfig::builder("0.7.0-alpha.1") // Custom namespace is not applied .with_if(custom_namespace, |builder| builder.namespace("my-namespace")) .build()?;
Trait Implementations
impl Clone for SysConfigBuilder
[src]
fn clone(&self) -> SysConfigBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for SysConfigBuilder
[src]
fn default() -> SysConfigBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for SysConfigBuilder
[src]
impl Send for SysConfigBuilder
[src]
impl Sync for SysConfigBuilder
[src]
impl Unpin for SysConfigBuilder
[src]
impl UnwindSafe for SysConfigBuilder
[src]
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> Erased for T
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,