pub enum OpenClosed {
Open,
Closed,
}Expand description
Whether a controlled fields vocabulary is open (folksonomy — unknown
values are allowed, only near-misses warn) or closed (every value must be a
known term; an unknown value is an error). See the fields block and
crate::vocabulary.
Variants§
Open
Unknown values allowed; check warns only on a probable typo of a known
term (casing/spelling drift).
Closed
Every value must resolve to a known term; an unknown value is a hard
check finding. The right posture for a safety-critical vocabulary (a
diaryx audience, where a typo is a disclosure bug).
Implementations§
Source§impl OpenClosed
impl OpenClosed
Sourcepub fn from_config_str(value: &str) -> Option<Self>
pub fn from_config_str(value: &str) -> Option<Self>
Parse the values config spelling; unknown → None.
Sourcepub fn as_config_str(self) -> &'static str
pub fn as_config_str(self) -> &'static str
The values config spelling.
Trait Implementations§
Source§impl Clone for OpenClosed
impl Clone for OpenClosed
Source§fn clone(&self) -> OpenClosed
fn clone(&self) -> OpenClosed
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 moreimpl Copy for OpenClosed
Source§impl Debug for OpenClosed
impl Debug for OpenClosed
Source§impl Default for OpenClosed
impl Default for OpenClosed
Source§fn default() -> OpenClosed
fn default() -> OpenClosed
Returns the “default value” for a type. Read more
impl Eq for OpenClosed
Source§impl PartialEq for OpenClosed
impl PartialEq for OpenClosed
impl StructuralPartialEq for OpenClosed
Auto Trait Implementations§
impl Freeze for OpenClosed
impl RefUnwindSafe for OpenClosed
impl Send for OpenClosed
impl Sync for OpenClosed
impl Unpin for OpenClosed
impl UnsafeUnpin for OpenClosed
impl UnwindSafe for OpenClosed
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,
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.