pub enum Token {
Show 64 variants Align(Expr, Option<Expr>), Assert(Expr, Option<Vec<FormattedExpr, Global>>), Assign(SmolStr, Expr, Option<BinaryOperation>), Bank(Option<Expr>), Bankset(Expr), Basic(Option<Vec<SmolStr, Global>>, Option<Vec<u16, Global>>, String), Break, Breakpoint(Option<Expr>), BuildCpr, BuildSna(Option<SnapshotVersion>), Charset(CharsetFormat), Comment(String), CrunchedBinary(CrunchType, SmolStr), CrunchedSection(CrunchType, BaseListing<Token>), Defb(Vec<Expr, Global>), Defs(Vec<(Expr, Option<Expr>), Global>), Defw(Vec<Expr, Global>), End, Equ(SmolStr, Expr), Export(Vec<SmolStr, Global>), Fail(Option<Vec<FormattedExpr, Global>>), For { label: SmolStr, start: Expr, stop: Expr, step: Option<Expr>, listing: BaseListing<Token>, }, Function(SmolStr, Vec<SmolStr, Global>, BaseListing<Token>), If(Vec<(TestKind, BaseListing<Token>), Global>, Option<BaseListing<Token>>), Incbin { fname: String, offset: Option<Expr>, length: Option<Expr>, extended_offset: Option<Expr>, off: bool, transformation: BinaryTransformation, }, Include(String, Option<SmolStr>, bool), Iterate(SmolStr, Vec<Expr, Global>, BaseListing<Token>), Label(SmolStr), Let(SmolStr, Expr), Limit(Expr), List, Macro(SmolStr, Vec<SmolStr, Global>, String), MacroCall(SmolStr, Vec<MacroParam, Global>), Module(SmolStr, BaseListing<Token>), MultiPop(Vec<DataAccess, Global>), MultiPush(Vec<DataAccess, Global>), Next(SmolStr, SmolStr, Option<Expr>), NoExport(Vec<SmolStr, Global>), NoList, OpCode(Mnemonic, Option<DataAccess>, Option<DataAccess>, Option<Register8>), Org(Expr, Option<Expr>), Pause, Print(Vec<FormattedExpr, Global>), Protect(Expr, Expr), Range(String, Expr, Expr), Repeat(Expr, BaseListing<Token>, Option<SmolStr>, Option<Expr>), RepeatUntil(Expr, BaseListing<Token>), Return(Expr), Rorg(Expr, BaseListing<Token>), Run(Expr, Option<Expr>), Save { filename: String, address: Option<Expr>, size: Option<Expr>, save_type: Option<SaveType>, dsk_filename: Option<String>, side: Option<Expr>, }, Section(SmolStr), SetCPC(Expr), SetCrtc(Expr), SetN(SmolStr, SmolStr, Option<Expr>), SnaInit(String), SnaSet(SnapshotFlag, FlagValue), StableTicker(StableTickerAction), Str(Vec<Expr, Global>), Struct(SmolStr, Vec<(SmolStr, Token), Global>), Switch(Expr, Vec<(Expr, BaseListing<Token>, bool), Global>, Option<BaseListing<Token>>), Undef(SmolStr), WaitNops(Expr), While(Expr, BaseListing<Token>),
}
Expand description

The embeded Listing can be of several kind (with the token or with decorated version of the token)

Variants§

§

Align(Expr, Option<Expr>)

§

Assert(Expr, Option<Vec<FormattedExpr, Global>>)

§

Assign(SmolStr, Expr, Option<BinaryOperation>)

§

Bank(Option<Expr>)

Configure the bank - completely incompatible with rasm behavior The expression corresponds to the GATE ARRAY value to select the bank of interest

§

Bankset(Expr)

§

Basic(Option<Vec<SmolStr, Global>>, Option<Vec<u16, Global>>, String)

Basic code which tokens will be included in the code (imported variables, lines to hide, code)

§

Break

§

Breakpoint(Option<Expr>)

§

BuildCpr

§

BuildSna(Option<SnapshotVersion>)

§

Charset(CharsetFormat)

§

Comment(String)

§

CrunchedBinary(CrunchType, SmolStr)

§

CrunchedSection(CrunchType, BaseListing<Token>)

§

Defb(Vec<Expr, Global>)

§

Defs(Vec<(Expr, Option<Expr>), Global>)

§

Defw(Vec<Expr, Global>)

§

End

§

Equ(SmolStr, Expr)

§

Export(Vec<SmolStr, Global>)

§

Fail(Option<Vec<FormattedExpr, Global>>)

§

For

Fields

§label: SmolStr
§start: Expr
§stop: Expr
§step: Option<Expr>
§

Function(SmolStr, Vec<SmolStr, Global>, BaseListing<Token>)

Function embeds a listing with a limited number of possible instructions and return a value

§

If(Vec<(TestKind, BaseListing<Token>), Global>, Option<BaseListing<Token>>)

Conditional expression. _0 contains all the expression and the appropriate code, _1 contains the else case

§

Incbin

Fields

§fname: String
§offset: Option<Expr>
§length: Option<Expr>
§extended_offset: Option<Expr>
§off: bool
§transformation: BinaryTransformation

Include of an asm file _0 contains the name of the file, _1 contains the content of the file. It is not loaded at the creation of the Token because there is not enough context to know where to load file

§

Include(String, Option<SmolStr>, bool)

§

Iterate(SmolStr, Vec<Expr, Global>, BaseListing<Token>)

§

Label(SmolStr)

§

Let(SmolStr, Expr)

§

Limit(Expr)

§

List

§

Macro(SmolStr, Vec<SmolStr, Global>, String)

§

MacroCall(SmolStr, Vec<MacroParam, Global>)

§

Module(SmolStr, BaseListing<Token>)

§

MultiPop(Vec<DataAccess, Global>)

§

MultiPush(Vec<DataAccess, Global>)

§

Next(SmolStr, SmolStr, Option<Expr>)

§

NoExport(Vec<SmolStr, Global>)

§

NoList

§

OpCode(Mnemonic, Option<DataAccess>, Option<DataAccess>, Option<Register8>)

Very last argument concerns only few undocumented instructions that save their results in a register

§

Org(Expr, Option<Expr>)

§

Pause

§

Print(Vec<FormattedExpr, Global>)

§

Protect(Expr, Expr)

§

Range(String, Expr, Expr)

Define a named section in the current page

§

Repeat(Expr, BaseListing<Token>, Option<SmolStr>, Option<Expr>)

Duplicate the token stream

§

RepeatUntil(Expr, BaseListing<Token>)

§

Return(Expr)

Return value from a function

§

Rorg(Expr, BaseListing<Token>)

Set the value of $ to Expr

§

Run(Expr, Option<Expr>)

§

Save

Fields

§filename: String
§address: Option<Expr>
§size: Option<Expr>
§save_type: Option<SaveType>
§dsk_filename: Option<String>
§side: Option<Expr>
§

Section(SmolStr)

§

SetCPC(Expr)

§

SetCrtc(Expr)

§

SetN(SmolStr, SmolStr, Option<Expr>)

§

SnaInit(String)

This directive setup a value for a given flag of the snapshot

§

SnaSet(SnapshotFlag, FlagValue)

§

StableTicker(StableTickerAction)

§

Str(Vec<Expr, Global>)

§

Struct(SmolStr, Vec<(SmolStr, Token), Global>)

§

Switch(Expr, Vec<(Expr, BaseListing<Token>, bool), Global>, Option<BaseListing<Token>>)

§

Undef(SmolStr)

§

WaitNops(Expr)

§

While(Expr, BaseListing<Token>)

Implementations§

source§

impl Token

source

pub fn new_opcode( mne: Mnemonic, arg1: Option<DataAccess>, arg2: Option<DataAccess> ) -> Token

source

pub fn fix_relative_jumps_after_disassembling(&mut self)

When diassembling code, the token with relative information are not appropriate

source

pub fn is_opcode(&self) -> bool

source

pub fn is_output_opcode(&self) -> bool

source

pub fn is_input_opcode(&self) -> bool

source

pub fn is_retlike_opcode(&self) -> bool

source

pub fn is_autocopy_opcode(&self) -> bool

Check if it is an undocumented instruction that makes a copy of the data to save in an additional register

source

pub fn label(&self) -> Option<&str>

source

pub fn is_label(&self) -> bool

source

pub fn macro_name(&self) -> Option<&str>

source

pub fn macro_arguments(&self) -> Option<&[SmolStr]>

source

pub fn macro_content(&self) -> Option<&str>

source

pub fn org_expr(&self) -> Option<&Expr>

👎Deprecated since 0.1.1: please use expr instead as other token need it

Rename the @labels in macros XXX no more needed - to remove later

source

pub fn expr(&self) -> Option<&Expr>

source

pub fn has_at_least_one_listing(&self) -> bool

Return true for directives that can emebed some listing information

Trait Implementations§

source§

impl Clone for Token

source§

fn clone(&self) -> Token

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Token

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for Token

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&Token> for DbLikeKind

source§

fn from(token: &Token) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Token

source§

fn from(byte: u8) -> Token

Converts to this type from the input type.
source§

impl ListingElement for Token

§

type Expr = Expr

§

type MacroParam = MacroParam

§

type TestKind = TestKind

source§

fn is_equ(&self) -> bool

source§

fn equ_symbol(&self) -> &str

source§

fn equ_value(&self) -> &Expr

source§

fn is_warning(&self) -> bool

source§

fn warning_token(&self) -> &Token

source§

fn warning_message(&self) -> &str

source§

fn is_module(&self) -> bool

source§

fn module_listing(&self) -> &[Token]

source§

fn module_name(&self) -> &str

source§

fn is_while(&self) -> bool

source§

fn while_expr(&self) -> &<Token as ListingElement>::Expr

source§

fn while_listing(&self) -> &[Token]

source§

fn mnemonic(&self) -> Option<&Mnemonic>

source§

fn mnemonic_arg1(&self) -> Option<&DataAccess>

source§

fn mnemonic_arg2(&self) -> Option<&DataAccess>

source§

fn mnemonic_arg1_mut(&mut self) -> Option<&mut DataAccess>

source§

fn mnemonic_arg2_mut(&mut self) -> Option<&mut DataAccess>

source§

fn is_directive(&self) -> bool

source§

fn is_iterate(&self) -> bool

source§

fn iterate_listing(&self) -> &[Token]

source§

fn iterate_counter_name(&self) -> &str

source§

fn iterate_values( &self ) -> Either<&Vec<<Token as ListingElement>::Expr, Global>, &<Token as ListingElement>::Expr>

source§

fn is_for(&self) -> bool

source§

fn for_listing(&self) -> &[Token]

source§

fn for_label(&self) -> &str

source§

fn for_start(&self) -> &<Token as ListingElement>::Expr

source§

fn for_stop(&self) -> &<Token as ListingElement>::Expr

source§

fn for_step(&self) -> Option<&<Token as ListingElement>::Expr>

source§

fn is_repeat_until(&self) -> bool

source§

fn repeat_until_listing(&self) -> &[Token]

source§

fn repeat_until_condition(&self) -> &<Token as ListingElement>::Expr

source§

fn is_repeat(&self) -> bool

source§

fn repeat_listing(&self) -> &[Token]

source§

fn repeat_count(&self) -> &<Token as ListingElement>::Expr

source§

fn repeat_counter_name(&self) -> Option<&str>

source§

fn repeat_counter_start(&self) -> Option<&<Token as ListingElement>::Expr>

source§

fn is_macro_definition(&self) -> bool

source§

fn macro_definition_name(&self) -> &str

source§

fn macro_definition_arguments(&self) -> SmallVec<[&str; 4]>

source§

fn macro_definition_code(&self) -> &str

source§

fn macro_call_name(&self) -> &str

source§

fn macro_call_arguments(&self) -> &[<Token as ListingElement>::MacroParam]

source§

fn is_if(&self) -> bool

source§

fn if_nb_tests(&self) -> usize

source§

fn if_test( &self, idx: usize ) -> (&<Token as ListingElement>::TestKind, &[Token])

source§

fn if_else(&self) -> Option<&[Token]>

source§

fn is_include(&self) -> bool

source§

fn is_incbin(&self) -> bool

source§

fn incbin_fname(&self) -> &str

source§

fn incbin_offset(&self) -> Option<&<Token as ListingElement>::Expr>

source§

fn incbin_length(&self) -> Option<&<Token as ListingElement>::Expr>

source§

fn incbin_transformation(&self) -> &BinaryTransformation

source§

fn include_fname(&self) -> &str

source§

fn include_namespace(&self) -> Option<&str>

source§

fn include_once(&self) -> bool

source§

fn is_call_macro_or_build_struct(&self) -> bool

source§

fn is_function_definition(&self) -> bool

source§

fn function_definition_name(&self) -> &str

source§

fn function_definition_params(&self) -> SmallVec<[&str; 4]>

source§

fn function_definition_inner(&self) -> &[Token]

source§

fn is_crunched_section(&self) -> bool

source§

fn crunched_section_listing(&self) -> &[Token]

source§

fn crunched_section_kind(&self) -> &CrunchType

source§

fn is_rorg(&self) -> bool

source§

fn rorg_listing(&self) -> &[Token]

source§

fn rorg_expr(&self) -> &<Token as ListingElement>::Expr

source§

fn is_confined(&self) -> bool

source§

fn confined_listing(&self) -> &[Token]

source§

fn is_switch(&self) -> bool

source§

fn switch_expr(&self) -> &<Token as ListingElement>::Expr

source§

fn switch_cases( &self ) -> Box<dyn Iterator<Item = (&<Token as ListingElement>::Expr, &[Token], bool)> + '_, Global>

source§

fn switch_default(&self) -> Option<&[Token]>

source§

fn is_db(&self) -> bool

source§

fn is_dw(&self) -> bool

source§

fn is_str(&self) -> bool

source§

fn include_is_standard_include(&self) -> bool

source§

impl Locate for Token

source§

impl MayHaveSpan for Token

source§

impl ParseToken for Token

source§

impl ParsingStateVerified for Token

source§

fn is_accepted(&self, state: &ParsingState) -> bool

source§

impl PartialEq<Token> for Token

source§

fn eq(&self, other: &Token) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ReturnExpr for Token

source§

impl ToSimpleToken for Token

source§

fn as_simple_token(&self) -> Cow<'_, Token>

Convert the token in its simplest form
source§

impl TokenExt for Token

source§

fn unroll(&self, env: &Env) -> Option<Result<Vec<&Self>, AssemblerError>>

Unroll the tokens when in a repetition loop TODO return an iterator in order to not produce the vector each time

source§

fn disassemble_data(&self) -> Result<Listing, String>

Generate the listing of opcodes for directives that contain data Defb/defw/Defs in order to have mnemonics. Fails when some values are not opcodes

source§

fn estimated_duration(&self) -> Result<usize, AssemblerError>

Returns an estimation of the duration. This estimation may be wrong for instruction having several states.

source§

fn to_bytes_with_options( &self, option: EnvOptions ) -> Result<Vec<u8>, AssemblerError>

source§

fn number_of_bytes(&self) -> Result<usize, String>

source§

fn number_of_bytes_with_context( &self, table: &mut SymbolsTableCaseDependent ) -> Result<usize, String>

Return the number of bytes of the token given the provided context
source§

fn to_bytes(&self) -> Result<Vec<u8>, AssemblerError>

Dummy version that assemble without taking into account the context TODO find a way to not build a symbol table each time
source§

fn to_bytes_with_context( &self, table: &mut SymbolsTableCaseDependent ) -> Result<Vec<u8>, AssemblerError>

Assemble the symbol taking into account some context, but never modify this context
source§

fn is_valid(&self) -> bool

Check if the token is valid. We consider a token vlaid if it is possible to assemble it
source§

impl Visited for Token

source§

fn visited(&self, env: &mut Env) -> Result<(), AssemblerError>

Make all the necessary for the given token
source§

impl Eq for Token

Auto Trait Implementations§

§

impl RefUnwindSafe for Token

§

impl Send for Token

§

impl Sync for Token

§

impl Unpin for Token

§

impl UnwindSafe for Token

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pipe for Twhere T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R ) -> Rwhere Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.