pub enum NameFilter {
Named(Vec<IdentifierString>),
Matches(Regex),
All,
}
Expand description
A name filter filters out elements that match by their name (an Identifier
).
Name filters have three actions:
- Apply to
All
names in a scope. - Apply to any name in the
Named
list. - Apply to any name that
Matches
the provided regex.
The following demonstrates all three of these actions in a single member import filter.
{
"member_import_filter": {
"sdml": "all",
"skos": {
"named": [
"changeNote",
"editorialNote",
"historyNote",
"scopeNote"
],
},
"xsd": {
"matches": "^[A-Z]+$"
}
}
}
Variants§
Implementations§
Source§impl NameFilter
impl NameFilter
Sourcepub fn is_excluded(&self, id: &Identifier) -> bool
pub fn is_excluded(&self, id: &Identifier) -> bool
Returns true
if the name id
is excluded, else false
.
Trait Implementations§
Source§impl Clone for NameFilter
impl Clone for NameFilter
Source§fn clone(&self) -> NameFilter
fn clone(&self) -> NameFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NameFilter
impl Debug for NameFilter
Source§impl<'de> Deserialize<'de> for NameFilter
impl<'de> Deserialize<'de> for NameFilter
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
Source§impl From<Identifier> for NameFilter
impl From<Identifier> for NameFilter
Source§fn from(value: Identifier) -> Self
fn from(value: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<IdentifierString> for NameFilter
impl From<IdentifierString> for NameFilter
Source§fn from(value: IdentifierString) -> Self
fn from(value: IdentifierString) -> Self
Converts to this type from the input type.
Source§impl From<NameFilter> for DefinitionFilter
impl From<NameFilter> for DefinitionFilter
Source§fn from(value: NameFilter) -> Self
fn from(value: NameFilter) -> Self
Converts to this type from the input type.
Source§impl From<Regex> for NameFilter
impl From<Regex> for NameFilter
Source§impl<I> FromIterator<I> for NameFilterwhere
I: Into<IdentifierString>,
impl<I> FromIterator<I> for NameFilterwhere
I: Into<IdentifierString>,
Source§fn from_iter<T: IntoIterator<Item = I>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = I>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl Freeze for NameFilter
impl RefUnwindSafe for NameFilter
impl Send for NameFilter
impl Sync for NameFilter
impl Unpin for NameFilter
impl UnwindSafe for NameFilter
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