pub struct NamedObjectDesc<T: DescContent> { /* private fields */ }

Implementations

Trait Implementations

NamedObjectDesc 的 AreaObjectDesc 自动实现

如果 T::AreaType 实现了 AreaObjectDesc 则自动为 NamedObjectDesc 实现 AreaObjectDesc

NamedObjectDesc 的 AuthorObjectDesc 自动实现

如果 T::AuthorType 实现了 AuthorObjectDesc 则自动为 NamedObjectDesc 实现 AuthorObjectDesc

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

NamedObjectDesc 的 MNKeyObjectDesc 自动实现

如果 T::PublicKeyType 实现了 MNKeyObjectDesc+PublicKeyObjectDesc 则自动实现了 MNKeyObjectDesc+PublicKeyObjectDesc

NamedObjectDesc 的 ObjectDesc 自动实现

对任意 T: DescContent 为 NamedObjectDesc 实现 ObjectDesc

NamedObjectDesc 的 OwnerObjectDesc 自动实现

如果 T::OwnerType 实现了 OwnerObjectDesc 则自动为 NamedObjectDesc 实现 OwnerObjectDesc

This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

NamedObjectDesc 的 PublicKeyObjectDesc 自动实现

SingleKeyObjectDesc 或者 MNKeyObjectDesc 一旦实现了就一定会实现 PublicKeyObjectDesc

NamedObjectDesc 的 解码

  • ctx: NamedObjectContext 从上层 NamedObjectBase 里传入编码的上下文
  • 通过 ctx 获取 Option 字段信息

NamedObjectDesc 独立编解码,需要包含obj_type+obj_flags信息

  • [1] ctx 部分包含obj_type, obj_flags 信息(前5bits为0,区别于NamedObject里的ctx.obj_flags)
  • [2] 其余部分为desc本身的编码 需要注意Desc部分独立编码,需要在头部编码正确的NamedObjectContext;如果在NamedObject内部整体编码,则由外层保证

NamedObjectDesc 的 编码

  • ctx: NamedObjectContext 从上层 NamedObjectBase 里传入编码的上下文
  • 通过 ctx 压缩Option字段的编码

NamedObjectDesc 的 SingleKeyObjectDesc 自动实现

如果 T::PublicKeyType 实现了 SingleKeyObjectDesc+PublicKeyObjectDesc 则自动实现 SingleKeyObjectDesc+PublicKeyObjectDesc

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.