Struct cyfs_base::NamedObjectId
source · pub struct NamedObjectId<T: ObjectType>(_, _);
Expand description
强类型命名对象Id
手工实现PartialEq、Eq、PartialOrd、Ord,附加的类型上并不需要实现这四个Trait 转发这四个Trait的实现给内部的ObjectId
Implementations§
source§impl NamedObjectId<NamedObjType<ContractDescContent<ContractData>, ContractBodyContent<ContractData>>>
impl NamedObjectId<NamedObjType<ContractDescContent<ContractData>, ContractBodyContent<ContractData>>>
pub fn from_hash_256(hash: GenericArray<u8, U32>) -> Self
source§impl<T: ObjectType> NamedObjectId<T>
impl<T: ObjectType> NamedObjectId<T>
Trait Implementations§
source§impl<T: ObjectType> AsRef<ObjectId> for NamedObjectId<T>
impl<T: ObjectType> AsRef<ObjectId> for NamedObjectId<T>
source§impl<T: Clone + ObjectType> Clone for NamedObjectId<T>
impl<T: Clone + ObjectType> Clone for NamedObjectId<T>
source§fn clone(&self) -> NamedObjectId<T>
fn clone(&self) -> NamedObjectId<T>
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<T: ObjectType> Debug for NamedObjectId<T>
impl<T: ObjectType> Debug for NamedObjectId<T>
source§impl<T: ObjectType> Default for NamedObjectId<T>
impl<T: ObjectType> Default for NamedObjectId<T>
source§impl<'de, T: ObjectType> Deserialize<'de> for NamedObjectId<T>
impl<'de, T: ObjectType> Deserialize<'de> for NamedObjectId<T>
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<T: ObjectType> Display for NamedObjectId<T>
impl<T: ObjectType> Display for NamedObjectId<T>
source§impl<T: ObjectType> FromStr for NamedObjectId<T>
impl<T: ObjectType> FromStr for NamedObjectId<T>
source§impl<T: ObjectType> Hash for NamedObjectId<T>
impl<T: ObjectType> Hash for NamedObjectId<T>
source§impl<T: ObjectType> Into<ObjectId> for NamedObjectId<T>
impl<T: ObjectType> Into<ObjectId> for NamedObjectId<T>
source§impl<T: ObjectType> Ord for NamedObjectId<T>
impl<T: ObjectType> Ord for NamedObjectId<T>
source§impl<T: ObjectType> PartialEq<NamedObjectId<T>> for NamedObjectId<T>
impl<T: ObjectType> PartialEq<NamedObjectId<T>> for NamedObjectId<T>
source§impl<T: ObjectType> PartialEq<NamedObjectId<T>> for ObjectId
impl<T: ObjectType> PartialEq<NamedObjectId<T>> for ObjectId
source§fn eq(&self, other: &NamedObjectId<T>) -> bool
fn eq(&self, other: &NamedObjectId<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: ObjectType> PartialEq<ObjectId> for NamedObjectId<T>
impl<T: ObjectType> PartialEq<ObjectId> for NamedObjectId<T>
source§impl<T: ObjectType> PartialOrd<NamedObjectId<T>> for NamedObjectId<T>
impl<T: ObjectType> PartialOrd<NamedObjectId<T>> for NamedObjectId<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more