pub enum ConfigRef {
Qualified {
ref_type: String,
name: String,
recreate: bool,
},
Unqualified {
name: String,
recreate: bool,
},
SystemId {
id: String,
},
Literal(String),
}Expand description
A parsed config object reference.
Produced by parse_config_ref from a raw string in a config file.
Variants§
Qualified
{{type.name}} or {{%type.name%}} — qualified reference.
Fields
Unqualified
{{name}} or {{%name%}} — unqualified reference (must resolve uniquely).
Fields
SystemId
{{#system_id#}} — literal system ID, no recreation.
Literal(String)
Plain string — not a {{...}} reference.
Implementations§
Source§impl ConfigRef
impl ConfigRef
Sourcepub fn effective_name(&self) -> &str
pub fn effective_name(&self) -> &str
Returns the effective name for config-internal lookups.
For Qualified, returns the name. For Unqualified, returns the name.
For SystemId, returns the id. For Literal, returns the raw string.
Sourcepub fn should_recreate(&self) -> bool
pub fn should_recreate(&self) -> bool
Whether this reference requests recreation.
Sourcepub fn is_reference(&self) -> bool
pub fn is_reference(&self) -> bool
Whether this is a {{...}} reference (not a plain literal).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ConfigRef
impl<'de> Deserialize<'de> for ConfigRef
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
impl Eq for ConfigRef
impl StructuralPartialEq for ConfigRef
Auto Trait Implementations§
impl Freeze for ConfigRef
impl RefUnwindSafe for ConfigRef
impl Send for ConfigRef
impl Sync for ConfigRef
impl Unpin for ConfigRef
impl UnsafeUnpin for ConfigRef
impl UnwindSafe for ConfigRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.