Struct cyfs_base::NamedObjectId
source · [−]pub struct NamedObjectId<T: ObjectType>(_, _);
Expand description
强类型命名对象Id
手工实现PartialEq、Eq、PartialOrd、Ord,附加的类型上并不需要实现这四个Trait 转发这四个Trait的实现给内部的ObjectId
Implementations
sourceimpl NamedObjectId<NamedObjType<ContractDescContent<ContractData>, ContractBodyContent<ContractData>>>
impl NamedObjectId<NamedObjType<ContractDescContent<ContractData>, ContractBodyContent<ContractData>>>
pub fn from_hash_256(hash: GenericArray<u8, U32>) -> Self
sourceimpl<T: ObjectType> NamedObjectId<T>
impl<T: ObjectType> NamedObjectId<T>
Trait Implementations
sourceimpl<T: ObjectType> AsRef<ObjectId> for NamedObjectId<T>
impl<T: ObjectType> AsRef<ObjectId> for NamedObjectId<T>
sourceimpl<T: Clone + ObjectType> Clone for NamedObjectId<T>
impl<T: Clone + ObjectType> Clone for NamedObjectId<T>
sourcefn clone(&self) -> NamedObjectId<T>
fn clone(&self) -> NamedObjectId<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: ObjectType> Debug for NamedObjectId<T>
impl<T: ObjectType> Debug for NamedObjectId<T>
sourceimpl<T: ObjectType> Default for NamedObjectId<T>
impl<T: ObjectType> Default for NamedObjectId<T>
sourceimpl<'de, T: ObjectType> Deserialize<'de> for NamedObjectId<T>
impl<'de, T: ObjectType> Deserialize<'de> for NamedObjectId<T>
sourcefn deserialize<D>(deserializer: D) -> Result<NamedObjectId<T>, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<NamedObjectId<T>, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T: ObjectType> Display for NamedObjectId<T>
impl<T: ObjectType> Display for NamedObjectId<T>
sourceimpl<T: ObjectType> FromStr for NamedObjectId<T>
impl<T: ObjectType> FromStr for NamedObjectId<T>
sourceimpl<T: ObjectType> Hash for NamedObjectId<T>
impl<T: ObjectType> Hash for NamedObjectId<T>
sourceimpl<T: ObjectType> Into<ObjectId> for NamedObjectId<T>
impl<T: ObjectType> Into<ObjectId> for NamedObjectId<T>
sourceimpl<T: ObjectType> Ord for NamedObjectId<T>
impl<T: ObjectType> Ord for NamedObjectId<T>
sourceimpl<T: ObjectType> PartialEq<NamedObjectId<T>> for NamedObjectId<T>
impl<T: ObjectType> PartialEq<NamedObjectId<T>> for NamedObjectId<T>
sourceimpl<T: ObjectType> PartialEq<NamedObjectId<T>> for ObjectId
impl<T: ObjectType> PartialEq<NamedObjectId<T>> for ObjectId
sourceimpl<T: ObjectType> PartialEq<ObjectId> for NamedObjectId<T>
impl<T: ObjectType> PartialEq<ObjectId> for NamedObjectId<T>
sourceimpl<T: ObjectType> PartialOrd<NamedObjectId<T>> for NamedObjectId<T>
impl<T: ObjectType> PartialOrd<NamedObjectId<T>> for NamedObjectId<T>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
sourceimpl<T: ObjectType> ProtobufTransform<&'_ NamedObjectId<T>> for Vec<u8>
impl<T: ObjectType> ProtobufTransform<&'_ NamedObjectId<T>> for Vec<u8>
fn transform(value: &NamedObjectId<T>) -> BuckyResult<Self>
sourceimpl<T: ObjectType> ProtobufTransform<Vec<u8, Global>> for NamedObjectId<T>
impl<T: ObjectType> ProtobufTransform<Vec<u8, Global>> for NamedObjectId<T>
fn transform(value: Vec<u8>) -> BuckyResult<Self>
sourceimpl<'de, T: ObjectType> RawDecode<'de> for NamedObjectId<T>
impl<'de, T: ObjectType> RawDecode<'de> for NamedObjectId<T>
fn raw_decode(buf: &'de [u8]) -> Result<(Self, &'de [u8]), BuckyError>
fn raw_decode_with_option(
buf: &'de [u8],
_opt: &RawDecodeOption
) -> BuckyResult<(Self, &'de [u8])>
sourceimpl<T: ObjectType> RawDiff for NamedObjectId<T>
impl<T: ObjectType> RawDiff for NamedObjectId<T>
fn diff_measure(&self, right: &Self) -> BuckyResult<usize>
fn diff<'d>(&self, right: &Self, buf: &'d mut [u8]) -> BuckyResult<&'d mut [u8]>
sourceimpl<T: ObjectType> RawEncode for NamedObjectId<T>
impl<T: ObjectType> RawEncode for NamedObjectId<T>
fn raw_measure(
&self,
purpose: &Option<RawEncodePurpose>
) -> Result<usize, BuckyError>
fn raw_encode<'a>(
&self,
buf: &'a mut [u8],
purpose: &Option<RawEncodePurpose>
) -> Result<&'a mut [u8], BuckyError>
fn raw_tail_encode<'a>(
&self,
buf: &'a mut [u8],
purpose: &Option<RawEncodePurpose>
) -> BuckyResult<&'a [u8]>
fn raw_encode_to_buffer(&self) -> BuckyResult<Vec<u8>>
fn raw_hash_value(&self) -> BuckyResult<HashValue>
fn hash_buf(&self, encoded_buf: &[u8]) -> HashValue
fn raw_hash_encode(&self) -> BuckyResult<Vec<u8>>
sourceimpl<T: ObjectType> RawFixedBytes for NamedObjectId<T>
impl<T: ObjectType> RawFixedBytes for NamedObjectId<T>
sourceimpl<'de, T: ObjectType> RawPatch<'de> for NamedObjectId<T>
impl<'de, T: ObjectType> RawPatch<'de> for NamedObjectId<T>
sourceimpl<T: ObjectType> Serialize for NamedObjectId<T>
impl<T: ObjectType> Serialize for NamedObjectId<T>
sourceimpl<T: ObjectType> TryFrom<&'_ ObjectId> for NamedObjectId<T>
impl<T: ObjectType> TryFrom<&'_ ObjectId> for NamedObjectId<T>
sourceimpl<T: ObjectType> TryFrom<ObjectId> for NamedObjectId<T>
impl<T: ObjectType> TryFrom<ObjectId> for NamedObjectId<T>
impl<T: Copy + ObjectType> Copy for NamedObjectId<T>
impl<T: ObjectType> Eq for NamedObjectId<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for NamedObjectId<T> where
T: RefUnwindSafe,
impl<T> Send for NamedObjectId<T> where
T: Send,
impl<T> Sync for NamedObjectId<T> where
T: Sync,
impl<T> Unpin for NamedObjectId<T> where
T: Unpin,
impl<T> UnwindSafe for NamedObjectId<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more