pub enum LocatorValue {
Text(String),
Explicit {
value: String,
plural: bool,
},
}Expand description
A locator value that supports both plain strings and explicit plurality.
Plain strings use heuristic plural detection (checking for -, –, ,, &).
Use the explicit form to override when the heuristic fails (e.g., “figure A-3”
should be singular despite containing a hyphen).
Variants§
Text(String)
Plain string value with heuristic plural detection.
Explicit
Explicit value with manual plural override.
Implementations§
Trait Implementations§
Source§impl Clone for LocatorValue
impl Clone for LocatorValue
Source§fn clone(&self) -> LocatorValue
fn clone(&self) -> LocatorValue
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 LocatorValue
impl Debug for LocatorValue
Source§impl Default for LocatorValue
impl Default for LocatorValue
Source§impl<'de> Deserialize<'de> for LocatorValue
impl<'de> Deserialize<'de> for LocatorValue
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<&str> for LocatorValue
impl From<&str> for LocatorValue
Source§impl From<String> for LocatorValue
impl From<String> for LocatorValue
Source§impl PartialEq for LocatorValue
impl PartialEq for LocatorValue
Source§fn eq(&self, other: &LocatorValue) -> bool
fn eq(&self, other: &LocatorValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LocatorValue
impl Serialize for LocatorValue
impl StructuralPartialEq for LocatorValue
Auto Trait Implementations§
impl Freeze for LocatorValue
impl RefUnwindSafe for LocatorValue
impl Send for LocatorValue
impl Sync for LocatorValue
impl Unpin for LocatorValue
impl UnsafeUnpin for LocatorValue
impl UnwindSafe for LocatorValue
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