Struct pliantdb_local::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>(contents: T) -> Result<Name, InvalidNameError> where
T: TryInto<Name, Error = InvalidNameError>,
pub fn new<T>(contents: T) -> Result<Name, InvalidNameError> where
T: TryInto<Name, Error = 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
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Name, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Name, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub 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
type Error = InvalidNameError
type Error = InvalidNameError
The type returned in the event of a conversion error.
type Error = InvalidNameError
type Error = InvalidNameError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl RefUnwindSafe for Name
impl UnwindSafe for Name
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self