pub struct RulesConfig(pub Value);Tuple Fields§
§0: ValueImplementations§
Source§impl RulesConfig
impl RulesConfig
pub fn get(&self, path: &str) -> Option<&Value>
pub fn from_toml_str(input: &str) -> Result<Self>
pub fn resolve_ref(&self, reference: &str) -> Option<&Value>
pub fn resolve<T>(&self, reference: &str) -> Result<T>where
T: DeserializeOwned,
pub fn is_reference(value: &str) -> bool
Sourcepub fn resolve_string(&self, value: &str) -> Result<String>
pub fn resolve_string(&self, value: &str) -> Result<String>
Resolve a string that may contain a rule reference. If the string is a @rules.* reference, resolves it and returns the string value. Otherwise, returns the string as-is.
pub fn resolve_value_refs(&self, value: &mut Value) -> Result<()>
Trait Implementations§
Source§impl Clone for RulesConfig
impl Clone for RulesConfig
Source§fn clone(&self) -> RulesConfig
fn clone(&self) -> RulesConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 RulesConfig
impl Debug for RulesConfig
Source§impl Default for RulesConfig
impl Default for RulesConfig
Source§impl<'de> Deserialize<'de> for RulesConfig
impl<'de> Deserialize<'de> for RulesConfig
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 RulesConfig
impl RefUnwindSafe for RulesConfig
impl Send for RulesConfig
impl Sync for RulesConfig
impl Unpin for RulesConfig
impl UnsafeUnpin for RulesConfig
impl UnwindSafe for RulesConfig
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