pub struct RulesetContent {
pub group: String,
pub rule_path: String,
pub rule_path_typed: String,
pub rule_type: RulesetType,
pub rule_content: Arc<RwLock<Option<String>>>,
pub update_interval: u32,
}Expand description
Represents a ruleset with its metadata and content Matches the C++ struct RulesetContent:
struct RulesetContent {
std::string rule_group;
std::string rule_path;
std::string rule_path_typed;
int rule_type = RULESET_SURGE;
std::shared_future<std::string> rule_content;
int update_interval = 0;
};Fields§
§group: String§rule_path: String§rule_path_typed: String§rule_type: RulesetType§rule_content: Arc<RwLock<Option<String>>>§update_interval: u32Implementations§
Source§impl RulesetContent
impl RulesetContent
Sourcepub fn get_rule_content(&self) -> String
pub fn get_rule_content(&self) -> String
Get rule content - simulates the std::shared_futurestd::string rule_content.get() in C++ Returns a reference to the actual content or an empty string if not available
Sourcepub fn set_rule_content(&mut self, content: &str)
pub fn set_rule_content(&mut self, content: &str)
Set the rule content Simulates setting the promise value that would fulfill the future in C++
Sourcepub fn has_rule_content(&self) -> bool
pub fn has_rule_content(&self) -> bool
Check if rule content has been set Simulates std::shared_future::valid() in C++
Trait Implementations§
Source§impl Clone for RulesetContent
impl Clone for RulesetContent
Source§fn clone(&self) -> RulesetContent
fn clone(&self) -> RulesetContent
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 moreAuto Trait Implementations§
impl Freeze for RulesetContent
impl RefUnwindSafe for RulesetContent
impl Send for RulesetContent
impl Sync for RulesetContent
impl Unpin for RulesetContent
impl UnwindSafe for RulesetContent
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