pub struct TypelessObjectDesc { /* private fields */ }
Expand description

无类型的Buffer对象,丢失了SubDesc和DescContent部分的类型信息 实际上也是可以做到带组合类型信息,不过Owner x Area x Author x PublicKey 一共有 24 种组合类型 不过,既然丢失了类型信息,只提供组合类型信息也只是完成了类型信息的一半, 可以通过提供build的方式重建具体的带类型信息的NamedObject,通过调用者注入具体的类型信息完成完整的重构

Implementations

丢失了SubDesc类型信息,用成员方法的方式暴露是否含有这些数据

Trait Implementations

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

TypelessObjectDesc 解码

  • [1] ctx 部分来自NamedObject里的ctx
  • [2] 其余部分为desc本身的解码

TypelessObjectDesc 用于计算ID用的编码

  • [1] ctx 部分包含obj_type, obj_flags 信息(前5bits为0,区别于NamedObject里的ctx.obj_flags)
  • [2] 其余部分为desc本身的编码

TypelessObjectDesc 编码

  • [1] ctx 部分来自NamedObject里的ctx
  • [2] 其余部分为desc本身的编码

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.