pub struct ADOVersion(/* private fields */);
Implementations§
Source§impl ADOVersion
impl ADOVersion
pub fn as_str(&self) -> &str
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn into_string(self) -> String
pub fn from_string(string: impl Into<String>) -> ADOVersion
pub fn from_type(ado_type: impl Into<String>) -> ADOVersion
pub fn with_version(&self, version: impl Into<String>) -> ADOVersion
Sourcepub fn validate(&self) -> bool
pub fn validate(&self) -> bool
Validates a given ADOVersion
A valid ADOVersion must:
- Be non-empty
- Have at most one
@
symbol
§Examples
ado_type@0.1.0
ado_type
ado_type@latest
Sourcepub fn get_version(&self) -> String
pub fn get_version(&self) -> String
Gets the version for the given ADOVersion
Returns "latest"
if no version provided
Trait Implementations§
Source§impl Clone for ADOVersion
impl Clone for ADOVersion
Source§fn clone(&self) -> ADOVersion
fn clone(&self) -> ADOVersion
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 ADOVersion
impl Debug for ADOVersion
Source§impl<'de> Deserialize<'de> for ADOVersion
impl<'de> Deserialize<'de> for ADOVersion
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 Hash for ADOVersion
impl Hash for ADOVersion
Source§impl JsonSchema for ADOVersion
impl JsonSchema for ADOVersion
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Ord for ADOVersion
impl Ord for ADOVersion
Source§fn cmp(&self, other: &ADOVersion) -> Ordering
fn cmp(&self, other: &ADOVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ADOVersion
impl PartialEq for ADOVersion
Source§impl PartialOrd for ADOVersion
impl PartialOrd for ADOVersion
Source§impl Serialize for ADOVersion
impl Serialize for ADOVersion
impl Eq for ADOVersion
impl StructuralPartialEq for ADOVersion
Auto Trait Implementations§
impl Freeze for ADOVersion
impl RefUnwindSafe for ADOVersion
impl Send for ADOVersion
impl Sync for ADOVersion
impl Unpin for ADOVersion
impl UnwindSafe for ADOVersion
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