pub struct TokenRecord {
pub token_id: u32,
pub vocabulary_id: VocabularyId,
pub vocabulary_version: Version,
pub content_hash: String,
pub symbol_type: TokenKind,
pub modality: Modality,
pub payload_encoding: String,
pub payload: Value,
pub frequency: Option<u64>,
pub metadata: BTreeMap<String, Value>,
}Expand description
The token envelope from FR-005: one token with everything needed to interpret it outside its vocabulary file.
Fields§
§token_id: u32§vocabulary_id: VocabularyId§vocabulary_version: Version§content_hash: String§symbol_type: TokenKind§modality: Modality§payload_encoding: String§payload: Value§frequency: Option<u64>§metadata: BTreeMap<String, Value>Trait Implementations§
Source§impl Clone for TokenRecord
impl Clone for TokenRecord
Source§fn clone(&self) -> TokenRecord
fn clone(&self) -> TokenRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenRecord
impl Debug for TokenRecord
Source§impl<'de> Deserialize<'de> for TokenRecord
impl<'de> Deserialize<'de> for TokenRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TokenRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TokenRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TokenRecord
impl PartialEq for TokenRecord
Source§impl Serialize for TokenRecord
impl Serialize for TokenRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TokenRecord
Auto Trait Implementations§
impl Forget for TokenRecord
impl Freeze for TokenRecord
impl Move for TokenRecord
impl RefUnwindSafe for TokenRecord
impl Send for TokenRecord
impl Sync for TokenRecord
impl Unpin for TokenRecord
impl UnsafeUnpin for TokenRecord
impl UnwindSafe for TokenRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more