#[repr(u32)]pub enum LlamaTokenAttr {
Unknown = 1,
Unused = 2,
Normal = 4,
Control = 8,
UserDefined = 16,
Byte = 32,
Normalized = 64,
LStrip = 128,
RStrip = 256,
SingleWord = 512,
}
Expand description
A rust flavored equivalent of llama_token_type
.
Variants§
Unknown = 1
Unused = 2
Normal = 4
Control = 8
UserDefined = 16
Byte = 32
Normalized = 64
LStrip = 128
RStrip = 256
SingleWord = 512
Trait Implementations§
Source§impl BitAnd for LlamaTokenAttr
impl BitAnd for LlamaTokenAttr
Source§impl BitFlag for LlamaTokenAttr
impl BitFlag for LlamaTokenAttr
Source§fn empty() -> BitFlags<Self>
fn empty() -> BitFlags<Self>
Create a
BitFlags
with no flags set (in other words, with a value of 0). Read moreSource§fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
Create a
BitFlags
if the raw value provided does not contain
any illegal flags. Read moreSource§fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
Create a
BitFlags
from an underlying bitwise value. If any
invalid bits are set, ignore them. Read moreSource§unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
Create a
BitFlags
unsafely, without checking if the bits form
a valid bit pattern for the type. Read moreSource§impl BitOr for LlamaTokenAttr
impl BitOr for LlamaTokenAttr
Source§impl BitXor for LlamaTokenAttr
impl BitXor for LlamaTokenAttr
Source§impl Clone for LlamaTokenAttr
impl Clone for LlamaTokenAttr
Source§fn clone(&self) -> LlamaTokenAttr
fn clone(&self) -> LlamaTokenAttr
Returns a copy of the value. Read more
1.0.0 · 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 LlamaTokenAttr
impl Debug for LlamaTokenAttr
Source§impl Not for LlamaTokenAttr
impl Not for LlamaTokenAttr
Source§impl PartialEq for LlamaTokenAttr
impl PartialEq for LlamaTokenAttr
Source§impl RawBitFlags for LlamaTokenAttr
impl RawBitFlags for LlamaTokenAttr
Source§const EMPTY: Self::Numeric = {transmute(0x00000000): <token_type::LlamaTokenAttr as enumflags2::_internal::RawBitFlags>::Numeric}
const EMPTY: Self::Numeric = {transmute(0x00000000): <token_type::LlamaTokenAttr as enumflags2::_internal::RawBitFlags>::Numeric}
A value with no bits set.
Source§const DEFAULT: Self::Numeric = {transmute(0x00000000): <token_type::LlamaTokenAttr as enumflags2::_internal::RawBitFlags>::Numeric}
const DEFAULT: Self::Numeric = {transmute(0x00000000): <token_type::LlamaTokenAttr as enumflags2::_internal::RawBitFlags>::Numeric}
The value used by the Default implementation. Equivalent to EMPTY, unless
customized.
Source§const ALL_BITS: Self::Numeric = {transmute(0x000003ff): <token_type::LlamaTokenAttr as enumflags2::_internal::RawBitFlags>::Numeric}
const ALL_BITS: Self::Numeric = {transmute(0x000003ff): <token_type::LlamaTokenAttr as enumflags2::_internal::RawBitFlags>::Numeric}
A value with all flag bits set.
Source§const BITFLAGS_TYPE_NAME: &'static str = "BitFlags<LlamaTokenAttr>"
const BITFLAGS_TYPE_NAME: &'static str = "BitFlags<LlamaTokenAttr>"
The name of the type for debug formatting purposes. Read more
impl Copy for LlamaTokenAttr
impl Eq for LlamaTokenAttr
impl StructuralPartialEq for LlamaTokenAttr
Auto Trait Implementations§
impl Freeze for LlamaTokenAttr
impl RefUnwindSafe for LlamaTokenAttr
impl Send for LlamaTokenAttr
impl Sync for LlamaTokenAttr
impl Unpin for LlamaTokenAttr
impl UnwindSafe for LlamaTokenAttr
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