Struct fastsend::Token[][src]

pub struct Token { /* fields omitted */ }
Expand description

Token 是一个完全独立的标记,通常用于表示某个完全独立的事物,其由两个部分组成: CursorIdent,分别代表了 Token 生成的时间和该时间下代表事物独立性 的一些要素。

注意

Cursor 虽然有时间含义,但由于其生成方式为计算时间间隔,因此其并不能代表 Token 生成的具体时间,只能说该时间仅用于区分不同 Token 的生成时间。

Ident 代表了一系列可组成一个独立标识的各项元素的组合,目前对 Ident 的实现为 依赖设备号、线程 ID、进程 ID 以及通过发号机创建的编号,Ident 是有可能重复的,只 有将 IdentCursor 组合才能完成一个独立的 Token

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

n 代表是对 Block 的第 N 次创建, 0 <= n < BlockFrame::QUEUE_SIZE。cursor 代表当前的时间锚点。

Formats the value using the given formatter. Read more

一个不成熟的想法 Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.