pub enum TypeSelector {
Single(String),
Multiple(Vec<String>),
}Expand description
Selector for reference types in overrides. Can be a single type string or a list of types.
Variants§
Implementations§
Source§impl TypeSelector
impl TypeSelector
Sourcepub fn matches(&self, ref_type: &str) -> bool
pub fn matches(&self, ref_type: &str) -> bool
Check whether this selector matches a reference type.
Type names are compared after normalizing underscores to hyphens, so “legal_case” and “legal-case” are treated as equivalent (matching both CSL 1.0 underscore convention and Citum hyphen convention).
The special keyword “all” always matches any reference type.
Sourcepub fn unknown_type_names(&self) -> Vec<&str>
pub fn unknown_type_names(&self) -> Vec<&str>
Returns any type names in this selector that are not in VALID_TYPE_NAMES.
An empty vec means all names are valid. Callers should emit a
crate::SchemaWarning for each returned name.
Trait Implementations§
Source§impl Clone for TypeSelector
impl Clone for TypeSelector
Source§fn clone(&self) -> TypeSelector
fn clone(&self) -> TypeSelector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TypeSelector
impl Debug for TypeSelector
Source§impl<'de> Deserialize<'de> for TypeSelector
impl<'de> Deserialize<'de> for TypeSelector
Source§fn deserialize<D>(
deserializer: D,
) -> Result<TypeSelector, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<TypeSelector, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TypeSelector
impl Display for TypeSelector
impl Eq for TypeSelector
Source§impl FromStr for TypeSelector
impl FromStr for TypeSelector
Source§type Err = Infallible
type Err = Infallible
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<TypeSelector, <TypeSelector as FromStr>::Err>
fn from_str(s: &str) -> Result<TypeSelector, <TypeSelector as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for TypeSelector
impl Hash for TypeSelector
Source§impl PartialEq for TypeSelector
impl PartialEq for TypeSelector
Source§fn eq(&self, other: &TypeSelector) -> bool
fn eq(&self, other: &TypeSelector) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TypeSelector
impl Serialize for TypeSelector
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TypeSelector
Auto Trait Implementations§
impl Freeze for TypeSelector
impl RefUnwindSafe for TypeSelector
impl Send for TypeSelector
impl Sync for TypeSelector
impl Unpin for TypeSelector
impl UnsafeUnpin for TypeSelector
impl UnwindSafe for TypeSelector
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.