pub struct SchemaVersion(/* private fields */);Expand description
Validated schema version label for shared envelopes and log records.
Implementations§
Source§impl SchemaVersion
impl SchemaVersion
Sourcepub fn new(
value: impl Into<String>,
) -> Result<SchemaVersion, ValueValidationError>
pub fn new( value: impl Into<String>, ) -> Result<SchemaVersion, ValueValidationError>
Creates a validated value from caller-provided string data.
§Errors
Returns ValueValidationError when the supplied string does
not satisfy the documented validation rules for this type.
Trait Implementations§
Source§impl AsRef<str> for SchemaVersion
impl AsRef<str> for SchemaVersion
Source§impl Clone for SchemaVersion
impl Clone for SchemaVersion
Source§fn clone(&self) -> SchemaVersion
fn clone(&self) -> SchemaVersion
Returns a duplicate of the value. Read more
1.0.0 · 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 SchemaVersion
impl Debug for SchemaVersion
Source§impl<'de> Deserialize<'de> for SchemaVersion
impl<'de> Deserialize<'de> for SchemaVersion
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SchemaVersion
impl Display for SchemaVersion
Source§impl Hash for SchemaVersion
impl Hash for SchemaVersion
Source§impl PartialEq for SchemaVersion
impl PartialEq for SchemaVersion
Source§impl Serialize for SchemaVersion
impl Serialize for SchemaVersion
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
Source§impl TryFrom<String> for SchemaVersion
impl TryFrom<String> for SchemaVersion
Source§type Error = ValueValidationError
type Error = ValueValidationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<SchemaVersion, <SchemaVersion as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<SchemaVersion, <SchemaVersion as TryFrom<String>>::Error>
Performs the conversion.
impl Eq for SchemaVersion
impl StructuralPartialEq for SchemaVersion
Auto Trait Implementations§
impl Freeze for SchemaVersion
impl RefUnwindSafe for SchemaVersion
impl Send for SchemaVersion
impl Sync for SchemaVersion
impl Unpin for SchemaVersion
impl UnsafeUnpin for SchemaVersion
impl UnwindSafe for SchemaVersion
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