pub struct PluginName(/* private fields */);Expand description
Validated plugin name matching [a-zA-Z][a-zA-Z0-9_-]* (1-64 ASCII
characters, starting with an ASCII letter). Case-preserving in storage.
Windows reserved device names (con, prn, aux, nul, com0-9,
lpt0-9) are rejected case-insensitively. Collisions inside a single
index use the canonical form.
Implementations§
Source§impl PluginName
impl PluginName
pub fn as_str(&self) -> &str
Sourcepub fn canonical(&self) -> String
pub fn canonical(&self) -> String
Canonical form for collision detection. Never surface to users;
use as_str()/Display for presentation.
Returns owned String rather than Cow<str>: the result differs
from as_str() whenever the name contains any uppercase character
or hyphen (common). Collision checks run O(n) in index size
(v1 cap: ~200 plugins), so allocation cost is not load-bearing
and the simpler type wins.
pub fn into_inner(self) -> String
Trait Implementations§
Source§impl Clone for PluginName
impl Clone for PluginName
Source§fn clone(&self) -> PluginName
fn clone(&self) -> PluginName
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 PluginName
impl Debug for PluginName
Source§impl<'de> Deserialize<'de> for PluginName
impl<'de> Deserialize<'de> for PluginName
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PluginName, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<PluginName, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PluginName
impl Display for PluginName
impl Eq for PluginName
Source§impl FromStr for PluginName
impl FromStr for PluginName
Source§type Err = SchemaError
type Err = SchemaError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<PluginName, <PluginName as FromStr>::Err>
fn from_str(s: &str) -> Result<PluginName, <PluginName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for PluginName
impl Hash for PluginName
Source§impl PartialEq for PluginName
impl PartialEq for PluginName
Source§fn eq(&self, other: &PluginName) -> bool
fn eq(&self, other: &PluginName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PluginName
impl Serialize for PluginName
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 PluginName
Auto Trait Implementations§
impl Freeze for PluginName
impl RefUnwindSafe for PluginName
impl Send for PluginName
impl Sync for PluginName
impl Unpin for PluginName
impl UnsafeUnpin for PluginName
impl UnwindSafe for PluginName
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more