pub trait ListingElement:
Sized
+ Debug
+ Sync {
type MacroParam: MacroParamElement;
type TestKind: TestKindElement;
type Expr: ExprElement + Debug + Eq + Clone;
type DataAccess: DataAccessElem<Expr = Self::Expr>;
type AssemblerControlCommand: AssemblerControlCommand;
Show 105 methods
// Required methods
fn is_assert(&self) -> bool;
fn is_buildcpr(&self) -> bool;
fn is_assembler_control(&self) -> bool;
fn assembler_control_command(&self) -> &Self::AssemblerControlCommand;
fn assembler_control_get_max_passes(&self) -> Option<&Self::Expr>;
fn assembler_control_get_listing(&self) -> &[Self];
fn is_org(&self) -> bool;
fn org_first(&self) -> &Self::Expr;
fn org_second(&self) -> Option<&Self::Expr>;
fn is_comment(&self) -> bool;
fn is_set(&self) -> bool;
fn is_label(&self) -> bool;
fn is_equ(&self) -> bool;
fn is_assign(&self) -> bool;
fn equ_symbol(&self) -> &str;
fn equ_value(&self) -> &Self::Expr;
fn assign_symbol(&self) -> &str;
fn assign_value(&self) -> &Self::Expr;
fn is_warning(&self) -> bool;
fn warning_token(&self) -> &Self;
fn warning_message(&self) -> &str;
fn mnemonic(&self) -> Option<&Mnemonic>;
fn mnemonic_arg1(&self) -> Option<&Self::DataAccess>;
fn mnemonic_arg2(&self) -> Option<&Self::DataAccess>;
fn mnemonic_arg1_mut(&mut self) -> Option<&mut Self::DataAccess>;
fn mnemonic_arg2_mut(&mut self) -> Option<&mut Self::DataAccess>;
fn is_directive(&self) -> bool;
fn is_module(&self) -> bool;
fn module_listing(&self) -> &[Self];
fn module_name(&self) -> &str;
fn is_while(&self) -> bool;
fn while_expr(&self) -> &Self::Expr;
fn while_listing(&self) -> &[Self];
fn is_switch(&self) -> bool;
fn switch_expr(&self) -> &Self::Expr;
fn switch_cases(
&self,
) -> Box<dyn Iterator<Item = (&Self::Expr, &[Self], bool)> + '_>;
fn switch_default(&self) -> Option<&[Self]>;
fn is_iterate(&self) -> bool;
fn iterate_listing(&self) -> &[Self];
fn iterate_counter_name(&self) -> &str;
fn iterate_values(&self) -> Either<&Vec<Self::Expr>, &Self::Expr> ⓘ;
fn is_for(&self) -> bool;
fn for_listing(&self) -> &[Self];
fn for_label(&self) -> &str;
fn for_start(&self) -> &Self::Expr;
fn for_stop(&self) -> &Self::Expr;
fn for_step(&self) -> Option<&Self::Expr>;
fn is_repeat_token(&self) -> bool;
fn repeat_token(&self) -> &Self;
fn is_repeat_until(&self) -> bool;
fn repeat_until_listing(&self) -> &[Self];
fn repeat_until_condition(&self) -> &Self::Expr;
fn is_rorg(&self) -> bool;
fn rorg_listing(&self) -> &[Self];
fn rorg_expr(&self) -> &Self::Expr;
fn is_repeat(&self) -> bool;
fn repeat_listing(&self) -> &[Self];
fn repeat_count(&self) -> &Self::Expr;
fn repeat_counter_name(&self) -> Option<&str>;
fn repeat_counter_start(&self) -> Option<&Self::Expr>;
fn repeat_counter_step(&self) -> Option<&Self::Expr>;
fn is_crunched_section(&self) -> bool;
fn crunched_section_listing(&self) -> &[Self];
fn crunched_section_kind(&self) -> &CrunchType;
fn is_macro_definition(&self) -> bool;
fn macro_definition_name(&self) -> &str;
fn macro_definition_arguments(&self) -> SmallVec<[&str; 4]>;
fn macro_definition_code(&self) -> &str;
fn macro_flavor(&self) -> AssemblerFlavor;
fn is_call_macro_or_build_struct(&self) -> bool;
fn macro_call_name(&self) -> &str;
fn macro_call_arguments(&self) -> &[Self::MacroParam];
fn is_if(&self) -> bool;
fn if_nb_tests(&self) -> usize;
fn if_test(&self, idx: usize) -> (&Self::TestKind, &[Self]);
fn if_else(&self) -> Option<&[Self]>;
fn is_incbin(&self) -> bool;
fn incbin_fname(&self) -> &Self::Expr;
fn incbin_offset(&self) -> Option<&Self::Expr>;
fn incbin_length(&self) -> Option<&Self::Expr>;
fn incbin_transformation(&self) -> &BinaryTransformation;
fn is_include(&self) -> bool;
fn include_fname(&self) -> &Self::Expr;
fn include_namespace(&self) -> Option<&str>;
fn include_once(&self) -> bool;
fn is_function_definition(&self) -> bool;
fn function_definition_name(&self) -> &str;
fn function_definition_params(&self) -> SmallVec<[&str; 4]>;
fn function_definition_inner(&self) -> &[Self];
fn is_confined(&self) -> bool;
fn confined_listing(&self) -> &[Self];
fn is_db(&self) -> bool;
fn is_dw(&self) -> bool;
fn is_str(&self) -> bool;
fn data_exprs(&self) -> &[Self::Expr];
fn is_run(&self) -> bool;
fn run_expr(&self) -> &Self::Expr;
fn is_print(&self) -> bool;
fn is_breakpoint(&self) -> bool;
fn is_save(&self) -> bool;
fn to_token(&self) -> Cow<'_, Token>;
// Provided methods
fn defer_listing_output(&self) -> bool { ... }
fn is_opcode(&self) -> bool { ... }
fn include_is_standard_include(&self) -> bool { ... }
fn starts_with_label(&self) -> bool { ... }
}Expand description
The ListingElement trait contains the public method any member of a listing should contain ATM there is nothing really usefull
Required Associated Types§
type MacroParam: MacroParamElement
type TestKind: TestKindElement
type Expr: ExprElement + Debug + Eq + Clone
type DataAccess: DataAccessElem<Expr = Self::Expr>
type AssemblerControlCommand: AssemblerControlCommand
Required Methods§
fn is_assert(&self) -> bool
fn is_buildcpr(&self) -> bool
fn is_assembler_control(&self) -> bool
fn assembler_control_command(&self) -> &Self::AssemblerControlCommand
fn assembler_control_get_max_passes(&self) -> Option<&Self::Expr>
fn assembler_control_get_listing(&self) -> &[Self]
fn is_org(&self) -> bool
fn org_first(&self) -> &Self::Expr
fn org_second(&self) -> Option<&Self::Expr>
fn is_comment(&self) -> bool
fn is_set(&self) -> bool
fn is_label(&self) -> bool
fn is_equ(&self) -> bool
fn is_assign(&self) -> bool
fn equ_symbol(&self) -> &str
fn equ_value(&self) -> &Self::Expr
fn assign_symbol(&self) -> &str
fn assign_value(&self) -> &Self::Expr
fn is_warning(&self) -> bool
fn warning_token(&self) -> &Self
fn warning_message(&self) -> &str
fn mnemonic(&self) -> Option<&Mnemonic>
fn mnemonic_arg1(&self) -> Option<&Self::DataAccess>
fn mnemonic_arg2(&self) -> Option<&Self::DataAccess>
fn mnemonic_arg1_mut(&mut self) -> Option<&mut Self::DataAccess>
fn mnemonic_arg2_mut(&mut self) -> Option<&mut Self::DataAccess>
fn is_directive(&self) -> bool
fn is_module(&self) -> bool
fn module_listing(&self) -> &[Self]
fn module_name(&self) -> &str
fn is_while(&self) -> bool
fn while_expr(&self) -> &Self::Expr
fn while_listing(&self) -> &[Self]
fn is_switch(&self) -> bool
fn switch_expr(&self) -> &Self::Expr
fn switch_cases( &self, ) -> Box<dyn Iterator<Item = (&Self::Expr, &[Self], bool)> + '_>
fn switch_default(&self) -> Option<&[Self]>
fn is_iterate(&self) -> bool
fn iterate_listing(&self) -> &[Self]
fn iterate_counter_name(&self) -> &str
fn iterate_values(&self) -> Either<&Vec<Self::Expr>, &Self::Expr> ⓘ
fn is_for(&self) -> bool
fn for_listing(&self) -> &[Self]
fn for_label(&self) -> &str
fn for_start(&self) -> &Self::Expr
fn for_stop(&self) -> &Self::Expr
fn for_step(&self) -> Option<&Self::Expr>
fn is_repeat_token(&self) -> bool
fn repeat_token(&self) -> &Self
fn is_repeat_until(&self) -> bool
fn repeat_until_listing(&self) -> &[Self]
fn repeat_until_condition(&self) -> &Self::Expr
fn is_rorg(&self) -> bool
fn rorg_listing(&self) -> &[Self]
fn rorg_expr(&self) -> &Self::Expr
fn is_repeat(&self) -> bool
fn repeat_listing(&self) -> &[Self]
fn repeat_count(&self) -> &Self::Expr
fn repeat_counter_name(&self) -> Option<&str>
fn repeat_counter_start(&self) -> Option<&Self::Expr>
fn repeat_counter_step(&self) -> Option<&Self::Expr>
fn is_crunched_section(&self) -> bool
fn crunched_section_listing(&self) -> &[Self]
fn crunched_section_kind(&self) -> &CrunchType
fn is_macro_definition(&self) -> bool
fn macro_definition_name(&self) -> &str
fn macro_definition_arguments(&self) -> SmallVec<[&str; 4]>
fn macro_definition_code(&self) -> &str
fn macro_flavor(&self) -> AssemblerFlavor
fn is_call_macro_or_build_struct(&self) -> bool
fn macro_call_name(&self) -> &str
fn macro_call_arguments(&self) -> &[Self::MacroParam]
fn is_if(&self) -> bool
fn if_nb_tests(&self) -> usize
fn if_test(&self, idx: usize) -> (&Self::TestKind, &[Self])
fn if_else(&self) -> Option<&[Self]>
fn is_incbin(&self) -> bool
fn incbin_fname(&self) -> &Self::Expr
fn incbin_offset(&self) -> Option<&Self::Expr>
fn incbin_length(&self) -> Option<&Self::Expr>
fn incbin_transformation(&self) -> &BinaryTransformation
fn is_include(&self) -> bool
fn include_fname(&self) -> &Self::Expr
fn include_namespace(&self) -> Option<&str>
fn include_once(&self) -> bool
fn is_function_definition(&self) -> bool
fn function_definition_name(&self) -> &str
fn function_definition_params(&self) -> SmallVec<[&str; 4]>
fn function_definition_inner(&self) -> &[Self]
fn is_confined(&self) -> bool
fn confined_listing(&self) -> &[Self]
fn is_db(&self) -> bool
fn is_dw(&self) -> bool
fn is_str(&self) -> bool
fn data_exprs(&self) -> &[Self::Expr]
fn is_run(&self) -> bool
fn run_expr(&self) -> &Self::Expr
fn is_print(&self) -> bool
fn is_breakpoint(&self) -> bool
fn is_save(&self) -> bool
fn to_token(&self) -> Cow<'_, Token>
Provided Methods§
fn defer_listing_output(&self) -> bool
fn is_opcode(&self) -> bool
fn include_is_standard_include(&self) -> bool
fn starts_with_label(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.