pub struct Token { /* fields omitted */ }
Expand description
Token 是一个完全独立的标记,通常用于表示某个完全独立的事物,其由两个部分组成:
Cursor 和 Ident,分别代表了 Token 生成的时间和该时间下代表事物独立性
的一些要素。
Cursor 虽然有时间含义,但由于其生成方式为计算时间间隔,因此其并不能代表 Token
生成的具体时间,只能说该时间仅用于区分不同 Token 的生成时间。
Ident 代表了一系列可组成一个独立标识的各项元素的组合,目前对 Ident 的实现为
依赖设备号、线程 ID、进程 ID 以及通过发号机创建的编号,Ident 是有可能重复的,只
有将 Ident 和 Cursor 组合才能完成一个独立的 Token。
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
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. 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.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,