Struct cpclib_asm::assembler::Env
source · pub struct Env { /* private fields */ }Expand description
Environment of the assembly
Implementations§
source§impl Env
impl Env
Symbols handling
pub fn options(&self) -> &EnvOptions
pub fn symbols(&self) -> &SymbolsTableCaseDependent
pub fn symbols_mut(&mut self) -> &mut SymbolsTableCaseDependent
sourcepub fn resolve_expr_may_fail_in_first_pass<E: ExprEvaluationExt>(
&self,
exp: &E
) -> Result<ExprResult, AssemblerError>
pub fn resolve_expr_may_fail_in_first_pass<E: ExprEvaluationExt>( &self, exp: &E ) -> Result<ExprResult, AssemblerError>
Compute the expression thanks to the symbol table of the environment. If the expression is not solvable in first pass, 0 is returned. If the expression is not solvable in second pass, an error is returned
However, when assembling in a crunched section, the expression MUST NOT fail. edit: why ? I do not get it now and I have removed this limitation
pub fn resolve_expr_may_fail_in_first_pass_with_default<E: ExprEvaluationExt, R: Into<ExprResult>>( &self, exp: &E, r: R ) -> Result<ExprResult, AssemblerError>
source§impl Env
impl Env
Error handling
sourcepub fn add_error_discardable_one_pass(
&mut self,
e: AssemblerError
) -> Result<(), AssemblerError>
pub fn add_error_discardable_one_pass( &mut self, e: AssemblerError ) -> Result<(), AssemblerError>
If the error has not been raised at the previous pass, store it and do not propagate it. Otherwise, propagate it
source§impl Env
impl Env
sourcepub fn with_table(symbols: &SymbolsTable) -> Self
pub fn with_table(symbols: &SymbolsTable) -> Self
Create an environment that embeds a copy of the given table and is configured to be in the latest pass. Mainly used for tests.
pub fn with_table_case_dependent(symbols: &SymbolsTableCaseDependent) -> Self
pub fn warnings(&self) -> &[AssemblerError]
sourcepub fn handle_post_actions(&mut self) -> Result<(), AssemblerError>
pub fn handle_post_actions(&mut self) -> Result<(), AssemblerError>
Handle the actions to do after assembling. ATM it is only the save of data for each page
pub fn handle_print(&mut self) -> Result<(), AssemblerError>
source§impl Env
impl Env
Output handling
sourcepub fn logical_output_address(&self) -> u16
pub fn logical_output_address(&self) -> u16
Return the address where the next byte will be written
sourcepub fn logical_code_address(&self) -> u16
pub fn logical_code_address(&self) -> u16
Return the address of dollar
pub fn limit_address(&self) -> u16
pub fn start_address(&self) -> Option<u16>
pub fn maximum_address(&self) -> u16
sourcepub fn update_dollar(&mut self)
pub fn update_dollar(&mut self)
. Update the value of $ in the symbol table in order to take the current output address
sourcepub fn memory(&self, start: u16, size: u16) -> Vec<u8> ⓘ
pub fn memory(&self, start: u16, size: u16) -> Vec<u8> ⓘ
Produce the memory for the required limits TODO check that the implementation is still correct with snapshot inclusion BUG does not take into account extra bank configuration
sourcepub fn produced_bytes(&self) -> Vec<u8> ⓘ
pub fn produced_bytes(&self) -> Vec<u8> ⓘ
Returns the stream of bytes produced for a 64k compilation
sourcepub fn loading_address(&self) -> Option<u16>
pub fn loading_address(&self) -> Option<u16>
Returns the address of the 1st written byte
sourcepub fn execution_address(&self) -> Option<u16>
pub fn execution_address(&self) -> Option<u16>
Returns the address from when to start the program TODO really configure this address
sourcepub fn output(&mut self, v: u8) -> Result<bool, AssemblerError>
pub fn output(&mut self, v: u8) -> Result<bool, AssemblerError>
Output one byte either in the appropriate bank of the snapshot or in the termporary bank return true if it raised an override warning
pub fn allow_memory_override(&self) -> bool
sourcepub fn output_bytes(&mut self, bytes: &[u8]) -> Result<(), AssemblerError>
pub fn output_bytes(&mut self, bytes: &[u8]) -> Result<(), AssemblerError>
Write consecutives bytes
pub fn peek(&self, address: &PhysicalAddress) -> u8
pub fn poke(&mut self, byte: u8, address: &PhysicalAddress)
sourcepub fn size(&self) -> u16
pub fn size(&self) -> u16
Get the size of the generated binary. ATTENTION it can only work when geneating 0x10000 files
sourcepub fn eval(&self, expr: &Expr) -> Result<ExprResult, AssemblerError>
pub fn eval(&self, expr: &Expr) -> Result<ExprResult, AssemblerError>
Evaluate the expression according to the current state of the environment
pub fn sna_version(&self) -> SnapshotVersion
pub fn save_sna<P: AsRef<Path>>(&self, fname: P) -> Result<(), Error>
source§impl Env
impl Env
pub fn add_warning(&mut self, warning: AssemblerError)
source§impl Env
impl Env
sourcepub fn generate_symbols_output<W: Write>(&self, w: &mut W) -> Result<()>
pub fn generate_symbols_output<W: Write>(&self, w: &mut W) -> Result<()>
Write in w the list of symbols
sourcepub fn visit_listing<T: ListingElement + Visited + MayHaveSpan>(
&mut self,
listing: &[T]
) -> Result<(), AssemblerError>
pub fn visit_listing<T: ListingElement + Visited + MayHaveSpan>( &mut self, listing: &[T] ) -> Result<(), AssemblerError>
Visit all the tokens of the slice of tokens. Return true if an additional pass is requested
pub fn visit_macro_definition( &mut self, name: &str, arguments: &[&str], code: &str, source: Option<&Z80Span> ) -> Result<(), AssemblerError>
pub fn visit_waitnops(&mut self, count: &Expr) -> Result<(), AssemblerError>
pub fn visit_struct_definition<T: ListingElement + ToSimpleToken, S: Borrow<str>>( &mut self, name: &str, content: &[(S, T)], source: Option<&Z80Span> ) -> Result<(), AssemblerError>
pub fn visit_buildsna( &mut self, version: Option<&SnapshotVersion> ) -> Result<(), AssemblerError>
pub fn visit_align( &mut self, boundary: &Expr, fill: Option<&Expr> ) -> Result<(), AssemblerError>
sourcepub fn logical_to_physical_address(&self, address: u16) -> PhysicalAddress
pub fn logical_to_physical_address(&self, address: u16) -> PhysicalAddress
return the page and bank configuration for the given address at the current mmr configuration https://grimware.org/doku.php/documentations/devices/gatearray#mmr
sourcepub fn visit_undef(&mut self, label: &str) -> Result<(), AssemblerError>
pub fn visit_undef(&mut self, label: &str) -> Result<(), AssemblerError>
Remove the given variable from the table of symbols
pub fn visit_protect( &mut self, start: &Expr, stop: &Expr ) -> Result<(), AssemblerError>
sourcepub fn visit_print(&mut self, info: &[FormattedExpr], span: Option<Z80Span>)
pub fn visit_print(&mut self, info: &[FormattedExpr], span: Option<Z80Span>)
Print the evaluation of the expression in the 2nd pass
pub fn visit_pause(&mut self, span: Option<Z80Span>)
pub fn visit_fail( &self, info: Option<&[FormattedExpr]> ) -> Result<(), AssemblerError>
pub fn visit_save( &mut self, filename: &str, address: Option<&Expr>, size: Option<&Expr>, save_type: Option<&SaveType>, dsk_filename: Option<&String>, _side: Option<&Expr> ) -> Result<(), AssemblerError>
pub fn visit_charset( &mut self, format: &CharsetFormat ) -> Result<(), AssemblerError>
pub fn visit_snainit(&mut self, fname: &str) -> Result<(), AssemblerError>
pub fn visit_snaset( &mut self, flag: &SnapshotFlag, value: &FlagValue ) -> Result<(), AssemblerError>
pub fn visit_incbin(&mut self, data: &[u8]) -> Result<(), AssemblerError>
sourcepub fn visit_crunched_section<'tokens, T: Visited + ListingElement + MayHaveSpan + Sync>(
&mut self,
kind: &CrunchType,
lst: &mut [ProcessedToken<'tokens, T>],
previous_bytes: &mut Option<Vec<u8>>,
previous_crunched_bytes: &mut Option<Vec<u8>>,
span: Option<&Z80Span>
) -> Result<(), AssemblerError>where
<T as ListingElement>::Expr: ExprEvaluationExt,
ProcessedToken<'tokens, T>: FunctionBuilder,
<<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt,
pub fn visit_crunched_section<'tokens, T: Visited + ListingElement + MayHaveSpan + Sync>( &mut self, kind: &CrunchType, lst: &mut [ProcessedToken<'tokens, T>], previous_bytes: &mut Option<Vec<u8>>, previous_crunched_bytes: &mut Option<Vec<u8>>, span: Option<&Z80Span> ) -> Result<(), AssemblerError>where <T as ListingElement>::Expr: ExprEvaluationExt, ProcessedToken<'tokens, T>: FunctionBuilder, <<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt,
Handle a crunched section. bytes generated during previous pass or previous loop are provided TO NOT crunched them an additional time if they are similar
source§impl Env
impl Env
Visit the tokens during several passes without providing a specific symbol table.
pub fn new(options: EnvOptions) -> Self
pub fn pass(&self) -> &AssemblingPass
source§impl Env
impl Env
pub fn visit_return(&mut self, e: &Expr) -> Result<(), AssemblerError>
pub fn user_defined_function( &self, name: &str ) -> Result<&Function, AssemblerError>
pub fn any_function<'res>( &'res self, name: &'res str ) -> Result<&'res Function, AssemblerError>
source§impl Env
impl Env
pub fn visit_while<'token, E, T>( &mut self, cond: &E, code: &mut [ProcessedToken<'token, T>], span: Option<&Z80Span> ) -> Result<(), AssemblerError>where T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync, <T as ListingElement>::Expr: ExprEvaluationExt, <<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt, ProcessedToken<'token, T>: FunctionBuilder,
sourcepub fn visit_iterate<'token, E: ExprEvaluationExt, T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync>(
&mut self,
counter_name: &str,
values: Either<&Vec<E>, &E>,
code: &mut [ProcessedToken<'token, T>],
span: Option<&Z80Span>
) -> Result<(), AssemblerError>where
<T as ListingElement>::Expr: ExprEvaluationExt,
<<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt,
ProcessedToken<'token, T>: FunctionBuilder,
pub fn visit_iterate<'token, E: ExprEvaluationExt, T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync>( &mut self, counter_name: &str, values: Either<&Vec<E>, &E>, code: &mut [ProcessedToken<'token, T>], span: Option<&Z80Span> ) -> Result<(), AssemblerError>where <T as ListingElement>::Expr: ExprEvaluationExt, <<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt, ProcessedToken<'token, T>: FunctionBuilder,
Handle the iterate repetition directive Values is either a list of values or a Expression that represents a list
pub fn visit_rorg<'token, T, E>( &mut self, address: &E, code: &mut [ProcessedToken<'token, T>], span: Option<&Z80Span> ) -> Result<(), AssemblerError>where E: ExprEvaluationExt, T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync, <T as ListingElement>::Expr: ExprEvaluationExt, <<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt, ProcessedToken<'token, T>: FunctionBuilder,
pub fn visit_confined<'token, E: ExprEvaluationExt, T>( &mut self, lst: &mut [ProcessedToken<'token, T>], span: Option<&Z80Span> ) -> Result<(), AssemblerError>where T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync, <T as ListingElement>::Expr: ExprEvaluationExt, <<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt, ProcessedToken<'token, T>: FunctionBuilder,
sourcepub fn visit_for<'token, E: ExprEvaluationExt, T>(
&mut self,
label: &str,
start: &E,
stop: &E,
step: Option<&E>,
code: &mut [ProcessedToken<'token, T>],
span: Option<&Z80Span>
) -> Result<(), AssemblerError>where
T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync,
<T as ListingElement>::Expr: ExprEvaluationExt,
<<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt,
ProcessedToken<'token, T>: FunctionBuilder,
pub fn visit_for<'token, E: ExprEvaluationExt, T>( &mut self, label: &str, start: &E, stop: &E, step: Option<&E>, code: &mut [ProcessedToken<'token, T>], span: Option<&Z80Span> ) -> Result<(), AssemblerError>where T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync, <T as ListingElement>::Expr: ExprEvaluationExt, <<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt, ProcessedToken<'token, T>: FunctionBuilder,
Handle the for directive
sourcepub fn visit_repeat_until<'token, E, T>(
&mut self,
cond: &E,
code: &mut [ProcessedToken<'token, T>],
span: Option<&Z80Span>
) -> Result<(), AssemblerError>where
E: ExprEvaluationExt,
T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync,
<T as ListingElement>::Expr: ExprEvaluationExt,
<<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt,
ProcessedToken<'token, T>: FunctionBuilder,
pub fn visit_repeat_until<'token, E, T>( &mut self, cond: &E, code: &mut [ProcessedToken<'token, T>], span: Option<&Z80Span> ) -> Result<(), AssemblerError>where E: ExprEvaluationExt, T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync, <T as ListingElement>::Expr: ExprEvaluationExt, <<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt, ProcessedToken<'token, T>: FunctionBuilder,
Handle the standard repetition directive
sourcepub fn visit_repeat<'token, T, E>(
&mut self,
count: &E,
code: &mut [ProcessedToken<'token, T>],
counter: Option<&str>,
counter_start: Option<&E>,
span: Option<&Z80Span>
) -> Result<(), AssemblerError>where
E: ExprEvaluationExt,
T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync,
<T as ListingElement>::Expr: ExprEvaluationExt,
<<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt,
ProcessedToken<'token, T>: FunctionBuilder,
pub fn visit_repeat<'token, T, E>( &mut self, count: &E, code: &mut [ProcessedToken<'token, T>], counter: Option<&str>, counter_start: Option<&E>, span: Option<&Z80Span> ) -> Result<(), AssemblerError>where E: ExprEvaluationExt, T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync, <T as ListingElement>::Expr: ExprEvaluationExt, <<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt, ProcessedToken<'token, T>: FunctionBuilder,
Handle the statndard repetition directive
source§impl Env
impl Env
Macro related code
pub fn inc_macro_seed(&mut self)
pub fn macro_seed(&self) -> usize
source§impl Env
impl Env
pub fn visit_basic<S: Borrow<str> + Display>( &mut self, variables: Option<&Vec<S>>, hidden_lines: Option<&Vec<u16>>, code: &str ) -> Result<(), AssemblerError>
pub fn assemble_basic<S: Borrow<str> + Display>( &mut self, variables: Option<&Vec<S>>, hidden_lines: Option<&Vec<u16>>, code: &str ) -> Result<Vec<u8>, AssemblerError>
source§impl Env
impl Env
pub fn assemble_cp(&mut self, arg: &DataAccess) -> Result<Bytes, AssemblerError>
pub fn assemble_sub( &mut self, arg: &DataAccess ) -> Result<Bytes, AssemblerError>
pub fn assemble_sbc( &mut self, arg1: &DataAccess, arg2: &DataAccess ) -> Result<Bytes, AssemblerError>
pub fn assemble_shift( &mut self, mne: Mnemonic, target: &DataAccess, hidden: Option<&DataAccess> ) -> Result<Bytes, AssemblerError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Env
impl !Send for Env
impl Sync for Env
impl Unpin for Env
impl UnwindSafe for Env
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,
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,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
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,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
§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,
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,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
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,
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,
self, then passes self.as_mut() into the pipe
function.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
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,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
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,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.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,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.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,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.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,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.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,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut() only in debug builds, and is erased in release
builds.