pub struct InstructionTextToken {
pub address: u64,
pub text: String,
pub confidence: u8,
pub context: InstructionTextTokenContext,
pub expr_index: Option<usize>,
pub type_: InstructionTextTokenType,
pub value: u64,
pub width: u64,
pub size: usize,
pub operand: usize,
pub type_names: Vec<String>,
}Fields§
§address: u64§text: String§confidence: u8§context: InstructionTextTokenContext§expr_index: Option<usize>§type_: InstructionTextTokenTypeNative token type. Use Self::kind for the typed interpretation.
value: u64Native value, including the unmodified payload bits of floating-point tokens.
width: u64Display width in columns. Zero selects the UTF-8 byte length of text.
size: usize§operand: usize§type_names: Vec<String>Implementations§
Source§impl InstructionTextToken
impl InstructionTextToken
Sourcepub fn new(text: impl Into<String>, kind: InstructionTextTokenKind) -> Self
pub fn new(text: impl Into<String>, kind: InstructionTextTokenKind) -> Self
Construct a new token without an associated address.
You most likely want to call InstructionTextToken::new_with_address, while also adjusting
the InstructionTextToken::expr_index field where applicable.
pub fn new_with_address( address: u64, text: impl Into<String>, kind: InstructionTextTokenKind, ) -> Self
Sourcepub fn kind(&self) -> InstructionTextTokenKind
pub fn kind(&self) -> InstructionTextTokenKind
Interprets the native fields as a typed token kind without discarding ancillary metadata. Mutate the token’s fields directly to change its metadata.
Trait Implementations§
Source§impl Clone for InstructionTextToken
impl Clone for InstructionTextToken
Source§fn clone(&self) -> InstructionTextToken
fn clone(&self) -> InstructionTextToken
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 InstructionTextToken
impl Debug for InstructionTextToken
Source§impl Display for InstructionTextToken
impl Display for InstructionTextToken
impl Eq for InstructionTextToken
Source§impl PartialEq for InstructionTextToken
impl PartialEq for InstructionTextToken
Source§fn eq(&self, other: &InstructionTextToken) -> bool
fn eq(&self, other: &InstructionTextToken) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InstructionTextToken
Auto Trait Implementations§
impl Freeze for InstructionTextToken
impl RefUnwindSafe for InstructionTextToken
impl Send for InstructionTextToken
impl Sync for InstructionTextToken
impl Unpin for InstructionTextToken
impl UnsafeUnpin for InstructionTextToken
impl UnwindSafe for InstructionTextToken
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