Enum brane_ctl::old_configs::v1_0_0::node::NodeKindConfig
source · pub enum NodeKindConfig {
Central(CentralConfig),
Worker(WorkerConfig),
}
Expand description
Define NodeKind-specific configuration.
Variants§
Central(CentralConfig)
The central node, which is the user’s access point and does all the orchestration.
Worker(WorkerConfig)
The worker node, which lives on a hospital and does all the heavy work.
Implementations§
source§impl NodeKindConfig
impl NodeKindConfig
sourcepub fn is_central(&self) -> bool
pub fn is_central(&self) -> bool
Returns if this NodeConfigKind is a `NodeConfigKind::Central of sorts.
sourcepub fn central(&self) -> &CentralConfig
pub fn central(&self) -> &CentralConfig
Returns this NodeConfigKind as if it was a NodeConfigKind::Central
.
Will panic otherwise.
sourcepub fn central_mut(&mut self) -> &mut CentralConfig
pub fn central_mut(&mut self) -> &mut CentralConfig
Returns this NodeConfigKind mutably as if it was a NodeConfigKind::Central
.
Will panic otherwise.
sourcepub fn into_central(self) -> CentralConfig
pub fn into_central(self) -> CentralConfig
Consumes this NodeConfigKind into a NodeConfigKind::Central
.
Will panic if it was not.
sourcepub fn is_worker(&self) -> bool
pub fn is_worker(&self) -> bool
Returns if this NodeConfigKind is a `NodeConfigKind::Worker of sorts.
sourcepub fn worker(&self) -> &WorkerConfig
pub fn worker(&self) -> &WorkerConfig
Returns this NodeConfigKind as if it was a NodeConfigKind::Worker
.
Will panic otherwise.
sourcepub fn worker_mut(&mut self) -> &mut WorkerConfig
pub fn worker_mut(&mut self) -> &mut WorkerConfig
Returns this NodeConfigKind mutably as if it was a NodeConfigKind::Worker
.
Will panic otherwise.
sourcepub fn into_worker(self) -> WorkerConfig
pub fn into_worker(self) -> WorkerConfig
Consumes this NodeConfigKind into a NodeConfigKind::Worker
.
Will panic if it was not.
Trait Implementations§
source§impl AsRef<NodeKindConfig> for NodeKindConfig
impl AsRef<NodeKindConfig> for NodeKindConfig
source§impl Clone for NodeKindConfig
impl Clone for NodeKindConfig
source§fn clone(&self) -> NodeKindConfig
fn clone(&self) -> NodeKindConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NodeKindConfig
impl Debug for NodeKindConfig
source§impl<'de> Deserialize<'de> for NodeKindConfig
impl<'de> Deserialize<'de> for NodeKindConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl EnumDebug for NodeKindConfig
impl EnumDebug for NodeKindConfig
source§fn type_name() -> &'static str
fn type_name() -> &'static str
source§fn variant_names() -> &'static [&'static str]
fn variant_names() -> &'static [&'static str]
source§fn variant_name(&self) -> &'static str
fn variant_name(&self) -> &'static str
source§fn variant(&self) -> EnumDebugFormatter<'_, Self>
fn variant(&self) -> EnumDebugFormatter<'_, Self>
source§impl From<&NodeKindConfig> for NodeKindConfig
impl From<&NodeKindConfig> for NodeKindConfig
source§fn from(value: &NodeKindConfig) -> Self
fn from(value: &NodeKindConfig) -> Self
source§impl From<&mut NodeKindConfig> for NodeKindConfig
impl From<&mut NodeKindConfig> for NodeKindConfig
source§fn from(value: &mut NodeKindConfig) -> Self
fn from(value: &mut NodeKindConfig) -> Self
Auto Trait Implementations§
impl Freeze for NodeKindConfig
impl RefUnwindSafe for NodeKindConfig
impl Send for NodeKindConfig
impl Sync for NodeKindConfig
impl Unpin for NodeKindConfig
impl UnwindSafe for NodeKindConfig
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self
to an expression for Diesel’s query builder. Read more