pub struct DomainMask {
pub domain: String,
pub included_elements: HashSet<String>,
pub excluded_elements: HashSet<String>,
}Expand description
Domain mask for filtering and constraints
Fields§
§domain: String§included_elements: HashSet<String>§excluded_elements: HashSet<String>Implementations§
Source§impl DomainMask
impl DomainMask
pub fn new(domain: impl Into<String>) -> Self
pub fn include(&mut self, element: impl Into<String>) -> &mut Self
pub fn exclude(&mut self, element: impl Into<String>) -> &mut Self
pub fn is_allowed(&self, element: &str) -> bool
pub fn apply_to_indices(&self, domain_info: &DomainInfo) -> Vec<usize>
Trait Implementations§
Source§impl Clone for DomainMask
impl Clone for DomainMask
Source§fn clone(&self) -> DomainMask
fn clone(&self) -> DomainMask
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 DomainMask
impl Debug for DomainMask
Source§impl<'de> Deserialize<'de> for DomainMask
impl<'de> Deserialize<'de> for DomainMask
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 DomainMask
impl RefUnwindSafe for DomainMask
impl Send for DomainMask
impl Sync for DomainMask
impl Unpin for DomainMask
impl UnwindSafe for DomainMask
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