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
pub fn get_fname<E: ExprEvaluationExt + Debug>( &self, exp: &E, ) -> Result<String, AssemblerError>
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_index_may_fail_in_first_pass<E: ExprEvaluationExt>( &self, (op, exp): (BinaryOperation, &E), ) -> Result<ExprResult, AssemblerError>
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
Handle the file search relatively to the current file
pub fn enter_current_working_file<P: AsRef<Utf8Path>>(&mut self, f: P)
pub fn leave_current_working_file(&mut self) -> Option<Utf8PathBuf>
pub fn get_current_working_directory(&self) -> Option<&Utf8Path>
pub fn has_current_working_directory(&self) -> bool
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. TODO use bon here
Sourcepub fn with_table_case_dependent(symbols: &SymbolsTableCaseDependent) -> Self
pub fn with_table_case_dependent(symbols: &SymbolsTableCaseDependent) -> Self
TODO use bon here
pub fn warnings(&self) -> &[AssemblerError]
Sourcepub fn handle_post_actions(
&mut self,
) -> Result<(Option<RemuChunk>, Option<WabpChunk>), AssemblerError>
pub fn handle_post_actions( &mut self, ) -> Result<(Option<RemuChunk>, Option<WabpChunk>), AssemblerError>
Handle the actions to do after assembling. ATM it is only the save of data for each page
pub fn observer(&self) -> Rc<dyn EnvEventObserver>
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
pub fn physical_output_address(&self) -> PhysicalAddress
pub fn physical_code_address(&self) -> PhysicalAddress
Sourcepub fn logical_code_address(&self) -> u16
pub fn logical_code_address(&self) -> u16
Return the address of dollar
pub fn output_limit_address(&self) -> u16
pub fn code_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 get_memory(&self, start: u16, size: u16) -> Vec<u8> ⓘ
pub fn get_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_byte(&mut self, v: u8) -> Result<bool, AssemblerError>
pub fn output_byte(&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, ) -> Result<(), AssemblerError>
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<Utf8Path>>(&self, fname: P) -> Result<(), Error>
pub fn save_cpr<P: AsRef<Utf8Path>>( &self, fname: P, ) -> Result<(), AssemblerError>
Source§impl Env
impl Env
pub fn add_warning(&mut self, warning: AssemblerError)
Source§impl Env
impl Env
Visit directives
pub fn visit_org_set_arguments( &mut self, code_adr: u16, output_adr: u16, ) -> Result<(), AssemblerError>
Source§impl Env
impl Env
Sourcepub fn generate_symbols_output<W: Write>(
&self,
w: &mut W,
fmt: SymbolOutputFormat,
) -> Result<()>
pub fn generate_symbols_output<W: Write>( &self, w: &mut W, fmt: SymbolOutputFormat, ) -> 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>, flavor: AssemblerFlavor, ) -> Result<(), AssemblerError>
pub fn visit_waitnops<E: ExprEvaluationExt>( &mut self, count: &E, ) -> Result<(), AssemblerError>
pub fn visit_struct_definition<T: ListingElement + ToSimpleToken, S1: SourceString, S2: AsRef<str>>( &mut self, name: S1, content: &[(S2, T)], source: Option<&Z80Span>, ) -> Result<(), AssemblerError>
pub fn visit_buildcpr(&mut self) -> Result<(), AssemblerError>
pub fn visit_buildsna( &mut self, version: Option<&SnapshotVersion>, ) -> Result<(), AssemblerError>
pub fn visit_assembler_control<C: AssemblerControlCommand>( &mut self, cmd: &C, span: Option<&Z80Span>, ) -> Result<(), AssemblerError>
pub fn visit_align<E: ExprEvaluationExt>( &mut self, boundary: &E, fill: Option<&E>, ) -> 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<S: SourceString>(
&mut self,
label: S,
) -> Result<(), AssemblerError>
pub fn visit_undef<S: SourceString>( &mut self, label: S, ) -> Result<(), AssemblerError>
Remove the given variable from the table of symbols
pub fn visit_protect<E: ExprEvaluationExt>( &mut self, start: &E, stop: &E, ) -> 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<E: ExprEvaluationExt + Debug>( &mut self, amsdos_fname: &E, address: Option<&E>, size: Option<&E>, save_type: Option<&SaveType>, dsk_fname: Option<&E>, _side: Option<&E>, ) -> Result<(), AssemblerError>
pub fn visit_charset( &mut self, format: &CharsetFormat, ) -> Result<(), AssemblerError>
pub fn visit_snainit<E: ExprEvaluationExt + Debug>( &mut self, fname: &E, ) -> 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 + ExprElement,
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 + ExprElement,
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<E: ExprEvaluationExt>( &mut self, e: &E, ) -> 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 + ExprElement,
<<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 + ExprElement,
<<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 + ExprElement,
<<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 + ExprElement,
<<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 + ExprElement,
<<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 + ExprElement,
<<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 + ExprElement,
<<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 + ExprElement,
<<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 + ExprElement,
<<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt,
ProcessedToken<'token, T>: FunctionBuilder,
Handle the standard repetition directive
pub fn visit_starting_index<E>(
&mut self,
start: Option<&E>,
step: Option<&E>,
) -> Result<(), AssemblerError>where
E: ExprEvaluationExt,
Sourcepub fn visit_repeat<'token, T, E>(
&mut self,
count: &E,
code: &mut [ProcessedToken<'token, T>],
counter_name: Option<&str>,
counter_start: Option<&E>,
counter_step: Option<&E>,
span: Option<&Z80Span>,
) -> Result<(), AssemblerError>where
E: ExprEvaluationExt,
T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync,
<T as ListingElement>::Expr: ExprEvaluationExt + ExprElement,
<<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_name: Option<&str>,
counter_start: Option<&E>,
counter_step: Option<&E>,
span: Option<&Z80Span>,
) -> Result<(), AssemblerError>where
E: ExprEvaluationExt,
T: ListingElement<Expr = E> + Visited + MayHaveSpan + Sync,
<T as ListingElement>::Expr: ExprEvaluationExt + ExprElement,
<<T as ListingElement>::TestKind as TestKindElement>::Expr: ExprEvaluationExt,
ProcessedToken<'token, T>: FunctionBuilder,
Handle the standard 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: SourceString, S2: SourceString, E: ExprEvaluationExt>( &mut self, variables: Option<Vec<S>>, hidden_lines: Option<&Vec<E>>, code: S2, ) -> Result<(), AssemblerError>
pub fn assemble_basic<S: SourceString, S2: SourceString, E: ExprEvaluationExt>( &mut self, variables: Option<Vec<S>>, hidden_lines: Option<&Vec<E>>, code: S2, ) -> Result<Vec<u8>, AssemblerError>
Source§impl Env
impl Env
pub fn assemble_cp<D: DataAccessElem>( &mut self, arg: &D, ) -> Result<Bytes, AssemblerError>
pub fn assemble_sub<D: DataAccessElem>( &mut self, arg: &D, ) -> Result<Bytes, AssemblerError>
pub fn assemble_sbc<D: DataAccessElem>( &mut self, arg1: Option<&D>, arg2: &D, ) -> Result<Bytes, AssemblerError>
pub fn assemble_shift<D: DataAccessElem>( &mut self, mne: Mnemonic, target: &D, hidden: Option<&D>, ) -> Result<Bytes, AssemblerError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Env
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§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 moreSource§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 moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
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()
.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§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.Source§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.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.