pub enum PackageIdent {
Named(NamedPackageIdent),
Hash(PackageHash),
}
Variants§
Named(NamedPackageIdent)
Hash(PackageHash)
Implementations§
Source§impl PackageIdent
impl PackageIdent
pub fn as_named(&self) -> Option<&NamedPackageIdent>
pub fn as_hash(&self) -> Option<&PackageHash>
Trait Implementations§
Source§impl Clone for PackageIdent
impl Clone for PackageIdent
Source§fn clone(&self) -> PackageIdent
fn clone(&self) -> PackageIdent
Returns a copy 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 PackageIdent
impl Debug for PackageIdent
Source§impl<'de> Deserialize<'de> for PackageIdent
impl<'de> Deserialize<'de> for PackageIdent
Source§fn deserialize<D>(deserializer: D) -> Result<PackageIdent, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<PackageIdent, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PackageIdent
impl Display for PackageIdent
Source§impl From<NamedPackageIdent> for PackageIdent
impl From<NamedPackageIdent> for PackageIdent
Source§fn from(value: NamedPackageIdent) -> Self
fn from(value: NamedPackageIdent) -> Self
Converts to this type from the input type.
Source§impl From<PackageHash> for PackageIdent
impl From<PackageHash> for PackageIdent
Source§fn from(value: PackageHash) -> Self
fn from(value: PackageHash) -> Self
Converts to this type from the input type.
Source§impl From<PackageIdent> for PackageSource
impl From<PackageIdent> for PackageSource
Source§fn from(id: PackageIdent) -> Self
fn from(id: PackageIdent) -> Self
Converts to this type from the input type.
Source§impl FromStr for PackageIdent
impl FromStr for PackageIdent
Source§impl Hash for PackageIdent
impl Hash for PackageIdent
Source§impl JsonSchema for PackageIdent
impl JsonSchema for PackageIdent
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &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 PartialEq for PackageIdent
impl PartialEq for PackageIdent
Source§impl Serialize for PackageIdent
impl Serialize for PackageIdent
impl Eq for PackageIdent
impl StructuralPartialEq for PackageIdent
Auto Trait Implementations§
impl Freeze for PackageIdent
impl RefUnwindSafe for PackageIdent
impl Send for PackageIdent
impl Sync for PackageIdent
impl Unpin for PackageIdent
impl UnwindSafe for PackageIdent
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.