pub enum ObjectConfig<'a> {
NodeConfig(NodeConfig<'a>),
ConnectionConfig(ConnectionConfig),
}Expand description
An enum representation of either a NodeConfig or a ConnectionConfig.
Variants§
NodeConfig(NodeConfig<'a>)
ConnectionConfig(ConnectionConfig)
Implementations§
Source§impl<'a> ObjectConfig<'a>
impl<'a> ObjectConfig<'a>
Sourcepub fn as_node_config_mut(&mut self) -> Option<&mut NodeConfig<'a>>
pub fn as_node_config_mut(&mut self) -> Option<&mut NodeConfig<'a>>
Optionally returns mutable references to the inner fields if this is a ObjectConfig::NodeConfig, otherwise None
Sourcepub fn as_node_config(&self) -> Option<&NodeConfig<'a>>
pub fn as_node_config(&self) -> Option<&NodeConfig<'a>>
Optionally returns references to the inner fields if this is a ObjectConfig::NodeConfig, otherwise None
Sourcepub fn into_node_config(self) -> Result<NodeConfig<'a>, Self>
pub fn into_node_config(self) -> Result<NodeConfig<'a>, Self>
Returns the inner fields if this is a ObjectConfig::NodeConfig, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_connection_config_mut(&mut self) -> Option<&mut ConnectionConfig>
pub fn as_connection_config_mut(&mut self) -> Option<&mut ConnectionConfig>
Optionally returns mutable references to the inner fields if this is a ObjectConfig::ConnectionConfig, otherwise None
Sourcepub fn as_connection_config(&self) -> Option<&ConnectionConfig>
pub fn as_connection_config(&self) -> Option<&ConnectionConfig>
Optionally returns references to the inner fields if this is a ObjectConfig::ConnectionConfig, otherwise None
Sourcepub fn into_connection_config(self) -> Result<ConnectionConfig, Self>
pub fn into_connection_config(self) -> Result<ConnectionConfig, Self>
Returns the inner fields if this is a ObjectConfig::ConnectionConfig, otherwise returns back the enum in the Err case of the result