Trait cyfs_base::DescContent
source · [−]pub trait DescContent {
type OwnerType: OwnerObj;
type AreaType: AreaObj;
type AuthorType: AuthorObj;
type PublicKeyType: PublicKeyObj;
fn obj_type() -> u16;
fn obj_type_code() -> ObjectTypeCode { ... }
fn desc_content_type() -> DescContentType { ... }
fn is_standard_object() -> bool { ... }
fn is_core_object() -> bool { ... }
fn is_decapp_object() -> bool { ... }
fn debug_info() -> String { ... }
fn version(&self) -> u8 { ... }
fn format(&self) -> u8 { ... }
}
Expand description
DescContent
Desc的用户自定义部分接口定义
- 提供 fn obj_type() -> u16
- 如果想要实现解码的向前兼容,提供 fn version() -> u16
- 提供 OwnerType/AreaType/AuthorType/PublicKeyType 类型
- 指定 SubDescNone 表示不提供该特性
- 否则指定 其他四种 SubDescType, 参考上面 SubDescType 的说明