pub trait SubDescType:
Sized
+ Sync
+ Send
+ Default {
// Required methods
fn is_none(&self) -> bool;
fn inner_raw_measure(
&self,
purpose: &Option<RawEncodePurpose>,
) -> Result<usize, BuckyError>;
fn inner_raw_encode<'a>(
&self,
buf: &'a mut [u8],
purpose: &Option<RawEncodePurpose>,
) -> Result<&'a mut [u8], BuckyError>;
fn inner_raw_decode<'de>(
buf: &'de [u8],
) -> Result<(Self, &'de [u8]), BuckyError>;
// Provided methods
fn is_support() -> bool { ... }
fn is_some(&self) -> bool { ... }
}Expand description
§子Desc类型系统
- SubDescType: Sized + Sync + Send
- OwnerObj: SubDescType+Clone
- AreaObj: SubDescType+Clone
- AuthorObj: SubDescType+Clone
- PublicKeyObj: SubDescType+Clone
Required Methods§
fn is_none(&self) -> bool
fn inner_raw_measure( &self, purpose: &Option<RawEncodePurpose>, ) -> Result<usize, BuckyError>
fn inner_raw_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> Result<&'a mut [u8], BuckyError>
fn inner_raw_decode<'de>( buf: &'de [u8], ) -> Result<(Self, &'de [u8]), BuckyError>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl SubDescType for Option<Area>
§Option
Option 用于AreaObjectDesc
impl SubDescType for Option<Area>
§Option
Option 用于AreaObjectDesc
fn is_none(&self) -> bool
fn inner_raw_measure( &self, purpose: &Option<RawEncodePurpose>, ) -> Result<usize, BuckyError>
fn inner_raw_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> Result<&'a mut [u8], BuckyError>
fn inner_raw_decode<'de>( buf: &'de [u8], ) -> Result<(Self, &'de [u8]), BuckyError>
Source§impl SubDescType for Option<ObjectId>
§Option
Option 用于OwnerObjectDesc或者AuthorObjectDesc
impl SubDescType for Option<ObjectId>
§Option
Option
fn is_none(&self) -> bool
fn inner_raw_measure( &self, purpose: &Option<RawEncodePurpose>, ) -> Result<usize, BuckyError>
fn inner_raw_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> Result<&'a mut [u8], BuckyError>
fn inner_raw_decode<'de>( buf: &'de [u8], ) -> Result<(Self, &'de [u8]), BuckyError>
Implementors§
impl SubDescType for MNPublicKey
§MNPublicKey
用于MNKeyObjectDesc、
impl SubDescType for PublicKey
§PublicKey
用于SingleKeyObjectDesc