pub enum IdOrName {
Id(String),
Name(String),
}
Expand description
A reference to a resource by either its ID or name.
Variants§
Implementations§
Trait Implementations§
source§impl PartialEq<IdOrName> for IdOrName
impl PartialEq<IdOrName> for IdOrName
source§impl Serialize for IdOrName
impl Serialize for IdOrName
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
impl Eq for IdOrName
impl StructuralEq for IdOrName
impl StructuralPartialEq for IdOrName
Auto Trait Implementations§
impl RefUnwindSafe for IdOrName
impl Send for IdOrName
impl Sync for IdOrName
impl Unpin for IdOrName
impl UnwindSafe for IdOrName
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.