pub struct NodeConfigDomain {
pub options: Vec<StaticDomainValue>,
pub i18n_config: HashMap<String, String>,
}Expand description
Domain value node configuration with options list.
Fields§
§options: Vec<StaticDomainValue>Available domain value options
i18n_config: HashMap<String, String>i18n configuration
Implementations§
Source§impl NodeConfigDomain
impl NodeConfigDomain
Sourcepub fn new(options: Vec<StaticDomainValue>) -> Self
pub fn new(options: Vec<StaticDomainValue>) -> Self
Create a new domain config
Sourcepub fn get_selected(&self) -> Option<&StaticDomainValue>
pub fn get_selected(&self) -> Option<&StaticDomainValue>
Get the selected option (if any)
Sourcepub fn value_from_id(&self, id: &str) -> Option<&StaticDomainValue>
pub fn value_from_id(&self, id: &str) -> Option<&StaticDomainValue>
Find option by ID
Sourcepub fn get_option_ids(&self) -> Vec<&str>
pub fn get_option_ids(&self) -> Vec<&str>
Get all option IDs
Trait Implementations§
Source§impl Clone for NodeConfigDomain
impl Clone for NodeConfigDomain
Source§fn clone(&self) -> NodeConfigDomain
fn clone(&self) -> NodeConfigDomain
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeConfigDomain
impl Debug for NodeConfigDomain
Source§impl Default for NodeConfigDomain
impl Default for NodeConfigDomain
Source§fn default() -> NodeConfigDomain
fn default() -> NodeConfigDomain
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NodeConfigDomain
impl<'de> Deserialize<'de> for NodeConfigDomain
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NodeConfigDomain
impl RefUnwindSafe for NodeConfigDomain
impl Send for NodeConfigDomain
impl Sync for NodeConfigDomain
impl Unpin for NodeConfigDomain
impl UnsafeUnpin for NodeConfigDomain
impl UnwindSafe for NodeConfigDomain
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