Struct pliantdb_core::schema::Name [−][src]
pub struct Name(_);
Expand description
A valid schema name. Must be alphanumeric (a-zA-Z9-0) or a hyphen (-).
Cloning this structure shares the underlying string data, regardless of
whether it’s a static string literal or an owned String.
Implementations
pub fn new<T: TryInto<Self, Error = InvalidNameError>>(
contents: T
) -> Result<Self, InvalidNameError>
pub fn new<T: TryInto<Self, Error = InvalidNameError>>(
contents: T
) -> Result<Self, InvalidNameError>Creates a new name after validating it.
Errors
Returns InvalidNameError if the value passed contains any characters
other than a-zA-Z9-0 or a hyphen (-).
Trait Implementations
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
type Error = InvalidNameError
type Error = InvalidNameErrorThe type returned in the event of a conversion error.
Performs the conversion.
type Error = InvalidNameError
type Error = InvalidNameErrorThe type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Nameimpl UnwindSafe for NameBlanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self