Struct InstructionBuilder

Source
pub struct InstructionBuilder<'a> {
    pub state: &'a mut InstructionBuilderState,
}

Fields§

§state: &'a mut InstructionBuilderState

Implementations§

Source§

impl<'a> InstructionBuilder<'a>

Source

pub const fn new(state: &'a mut InstructionBuilderState) -> Self

Source§

impl InstructionBuilder<'_>

Source

pub fn add_trap_if_lt( &mut self, a: &TypedRegister, b: &TypedRegister, node: &Node, comment: &str, )

Source

pub const fn position(&self) -> InstructionPosition

Source

pub fn add_enter_placeholder( &mut self, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn patch_enter( &mut self, size: FrameMemorySize, patch_position: PatchPosition, )

Source

pub fn add_jmp_if_equal_placeholder( &mut self, test_reg: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_jmp_if_true_placeholder( &mut self, test_reg: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_jmp_if_not_equal_placeholder( &mut self, test_reg: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_jmp_if_not_true_placeholder( &mut self, test_reg: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_jmp_if_not_equal_polarity_placeholder( &mut self, test_reg: &TypedRegister, polarity: &ZFlagPolarity, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_grid_init( &mut self, target: &TypedRegister, element_size_reg: &TypedRegister, width: u16, height: u16, node: &Node, comment: &str, )

Source

pub fn add_grid_get_entry_addr( &mut self, target: &TypedRegister, grid_self_addr_reg: &PointerLocation, x_reg: &TypedRegister, y_reg: &TypedRegister, element_size: MemorySize, node: &Node, comment: &str, )

Source

pub fn add_sparse_init( &mut self, target: &PointerLocation, element_size: MemorySize, capacity: u16, node: &Node, comment: &str, )

Source

pub fn add_sparse_add_give_entry_address( &mut self, target_entry_addr_reg: &TypedRegister, dest_handle_reg: &TypedRegister, sparse_addr_reg: &PointerLocation, element_size: MemorySize, node: &Node, comment: &str, )

Source

pub fn add_sparse_remove( &mut self, sparse_ptr_reg: &PointerLocation, int_reg: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_sparse_is_alive( &mut self, dest_bool_reg: &TypedRegister, sparse_ptr_reg: &PointerLocation, int_reg: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_sparse_get_entry_addr( &mut self, dest_entry_address_reg: &TypedRegister, sparse_ptr_reg: &PointerLocation, int_handle_reg: &TypedRegister, element_size: MemorySize, node: &Node, comment: &str, )

Source

pub fn add_vec_cmp( &mut self, dest_bool_reg: &TypedRegister, first_ptr: &TypedRegister, second_ptr: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_swap( &mut self, vec_self_addr: &TypedRegister, int_index_a: &TypedRegister, int_index_b: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_subscript( &mut self, target: &TypedRegister, self_addr: &TypedRegister, index: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_push_addr( &mut self, target_reg: &TypedRegister, vec_self_reg: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_extend( &mut self, self_vec_addr: &TypedRegister, other_vec_addr: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_pop( &mut self, target_addr: &TypedRegister, self_addr: &TypedRegister, element_size: MemorySize, node: &Node, comment: &str, )

Source

pub fn add_vec_remove_index( &mut self, self_addr: &TypedRegister, element_item: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_remove_index_get_value( &mut self, target_addr: &TypedRegister, self_addr: &TypedRegister, element_item: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_iter_next_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_vec_iter_next_pair_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable_key: &TypedRegister, closure_variable_value: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_string_iter_next_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_string_iter_next_pair_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable_key: &TypedRegister, closure_variable_value: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_eq_u8_immediate( &mut self, dest_bool_reg: &TypedRegister, source_addr: &TypedRegister, immediate: u8, node: &Node, comment: &str, )

Source

pub fn add_call_placeholder( &mut self, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_jump_placeholder( &mut self, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_lea_from_frame_region( &mut self, target_heap: &TypedRegister, frame_address_to_convert: FrameMemoryRegion, node: &Node, comment: &str, )

Source

pub fn add_ld_contiguous_regs_from_frame( &mut self, target_reg: u8, stored_in_frame: FrameMemoryRegion, count: u8, node: &Node, comment: &str, )

Source

pub fn add_ld_masked_regs_from_frame( &mut self, register_mask: u8, stored_in_frame: FrameMemoryRegion, node: &Node, comment: &str, )

Source

pub fn add_st_contiguous_regs_to_frame( &mut self, frame_mem: FrameMemoryRegion, source_reg: u8, count: u8, node: &Node, comment: &str, )

Source

pub fn add_st_masked_regs_to_frame( &mut self, start_frame_mem: FrameMemoryAddress, source_reg_mask: u8, node: &Node, comment: &str, )

Source

pub fn add_block_copy_with_immediate_size( &mut self, target_base_ptr_reg: &PointerLocation, source_base_ptr_reg: &PointerLocation, memory_size: MemorySize, node: &Node, comment: &str, )

Source

pub fn add_panic(&mut self, str: &TypedRegister, node: &Node, comment: &str)

Source

pub fn add_halt(&mut self, node: &Node, comment: &str)

Source

pub fn add_step(&mut self, node: &Node, comment: &str)

Source

pub fn add_call( &mut self, function_ip: &InstructionPosition, node: &Node, comment: &str, )

Source

pub fn add_host_call( &mut self, host_function_id: u16, arguments_count: u8, node: &Node, comment: &str, )

Source

pub fn patch_jump( &mut self, patch_position: PatchPosition, target_position: &InstructionPosition, )

§Panics
Source

pub fn patch_jump_here(&mut self, jump_position: PatchPosition)

Source

pub fn add_jmp(&mut self, pc: InstructionPosition, node: &Node, comment: &str)

Source

pub fn add_frame_memory_clear( &mut self, frame_region: FrameMemoryRegion, node: &Node, comment: &str, )

Source

pub fn add_map_iter_init( &mut self, iterator_target: &TypedRegister, pointer_to_map_header: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_map_iter_next_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_map_iter_next_pair_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, closure_variable_b: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_range_init( &mut self, target_range_iterator: &TypedRegister, min_reg: &TypedRegister, max_reg: &TypedRegister, is_inclusive_reg: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_range_iter_next_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_string_duplicate( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_bytes_to_string( &mut self, dest_string_view_reg: &TypedRegister, source_byte_vec_ref: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_bytes_to_string_storage( &mut self, dest_string_storage_reg: &TypedRegister, source_byte_vec_ref: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_string_append( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_string_multiply( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_string_cmp( &mut self, dest_bool_reg: &TypedRegister, a: &TypedRegister, b: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_fixed_capacity_array_init_fill_capacity_and_len( &mut self, target_vec_to_init: &PointerLocation, capacity: u16, element_size: &MemorySize, node: &Node, comment: &str, )

Source

pub fn add_map_init_set_capacity( &mut self, target_map_to_init: &PointerLocation, logical_limit: CountU16, key_size_reg: &TypedRegister, key_alignment: MemoryAlignment, value_size_reg: &TypedRegister, value_alignment: MemoryAlignment, node: &Node, comment: &str, )

Source

pub fn add_map_overwrite( &mut self, destination_map: &PointerLocation, source_map: &PointerLocation, node: &Node, comment: &str, )

Source

pub fn add_range_iter_init( &mut self, iterator_target: &TypedRegister, range_source_header: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_copy( &mut self, target_vec: &PointerLocation, source_vec: &PointerLocation, node: &Node, comment: &str, )

Source

pub fn add_vec_copy_range( &mut self, target_vec: &PointerLocation, source_vec: &PointerLocation, range_header: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_init_set_capacity( &mut self, target_vec_to_init: &PointerLocation, capacity: CountU16, element_size: &MemorySize, node: &Node, comment: &str, )

Source

pub fn add_vec_iter_init( &mut self, iterator_target: &TypedRegister, pointer_to_vec_header: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_vec_iter_next( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, instruction_position: InstructionPosition, node: &Node, comment: &str, )

Source

pub fn add_vec_iter_next_pair( &mut self, iterator_target: &TypedRegister, closure_variable_key: &TypedRegister, closure_variable_value: &TypedRegister, instruction_position: InstructionPosition, node: &Node, comment: &str, )

Source

pub fn add_string_iter_init( &mut self, iterator_target: &TypedRegister, pointer_to_vec_header: &TypedRegister, element_size: MemorySize, node: &Node, comment: &str, )

Source

pub fn add_string_iter_next( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, instruction_position: InstructionPosition, node: &Node, comment: &str, )

Source

pub fn add_string_iter_next_pair( &mut self, iterator_target: &TypedRegister, closure_variable_key: &TypedRegister, closure_variable_value: &TypedRegister, instruction_position: InstructionPosition, node: &Node, comment: &str, )

Source

pub fn add_st32_using_ptr_with_offset( &mut self, scalar_lvalue_location: &MemoryLocation, u32_reg: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_st16_using_ptr_with_offset( &mut self, scalar_lvalue_location: &MemoryLocation, u16_reg: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_st8_using_ptr_with_offset( &mut self, scalar_lvalue_location: &MemoryLocation, u8_reg: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_mov_16_immediate_value( &mut self, dst_offset: &TypedRegister, value: u16, node: &Node, comment: &str, )

Source

pub fn add_mov_32_immediate_value( &mut self, dst_offset: &TypedRegister, value: u32, node: &Node, comment: &str, )

Source

pub fn add_ld32_from_absolute_memory_address( &mut self, dst_reg: &TypedRegister, absolute_mem_addr: &HeapMemoryAddress, node: &Node, comment: &str, )

Source

pub fn add_ld16_from_pointer_from_memory_location( &mut self, dst_reg: &TypedRegister, source_memory_location: &MemoryLocation, node: &Node, comment: &str, )

Source

pub fn add_ld16_from_pointer_with_offset_u16( &mut self, dst_reg: &TypedRegister, base_ptr_reg: &TypedRegister, offset: MemoryOffset, node: &Node, comment: &str, )

Source

pub fn add_ld32_from_pointer_with_offset_u16( &mut self, dst_reg: &TypedRegister, base_ptr_reg: &TypedRegister, offset: MemoryOffset, node: &Node, comment: &str, )

Source

pub fn add_ld8_from_absolute_memory_address( &mut self, dst_reg: &TypedRegister, absolute_mem_addr: &HeapMemoryAddress, node: &Node, comment: &str, )

Source

pub fn add_check_u8( &mut self, dst_reg: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_ld8_from_pointer_with_offset( &mut self, dst_reg: &TypedRegister, base_ptr_reg: &TypedRegister, offset: MemoryOffset, node: &Node, comment: &str, )

Source

pub fn add_mov_reg( &mut self, dst_offset: &TypedRegister, src_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_mov8_immediate( &mut self, dst_offset: &TypedRegister, value: u8, node: &Node, comment: &str, )

Source

pub fn add_add_u32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_add_u32_imm( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_immediate: u32, node: &Node, comment: &str, )

Source

pub fn add_mod_i32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_div_i32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_sub_u32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_mul_i32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_neg_i32( &mut self, target: &TypedRegister, source: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_sub_f32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_mul_f32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_div_f32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_add_f32( &mut self, dst_offset: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_neg_f32( &mut self, target: &TypedRegister, source: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_lt_i32( &mut self, dest_bool_reg: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_lt_u32( &mut self, dest_bool_reg: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_le_u32( &mut self, dest_bool_reg: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_le_i32( &mut self, dest_bool_reg: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_gt_i32( &mut self, dest_bool_reg: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_ge_i32( &mut self, dest_bool_reg: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_ge_u32( &mut self, dest_bool_reg: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_gt_u32( &mut self, dest_bool_reg: &TypedRegister, lhs_offset: &TypedRegister, rhs_offset: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_meqz( &mut self, dest_bool_reg: &TypedRegister, addr: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_trap(&mut self, trap_code: u8, node: &Node, comment: &str)

Source

pub fn add_cmp_reg( &mut self, dest_bool_reg: &TypedRegister, source_a: &TypedRegister, source_b: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_block_cmp( &mut self, dest_bool_reg: &TypedRegister, first_ptr: &TypedRegister, second_ptr: &TypedRegister, size: MemorySize, node: &Node, comment: &str, )

Source

pub fn add_map_has( &mut self, dest_reg: &TypedRegister, self_addr: &PointerLocation, key_addr: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_map_remove( &mut self, self_addr: &PointerLocation, key_addr: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_map_get_entry_location( &mut self, target_entry_addr: &TypedRegister, map_self_addr: &PointerLocation, key: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_map_get_or_reserve_entry_location( &mut self, target_entry_reg: &TypedRegister, map_self_addr: &PointerLocation, key: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_int_rnd( &mut self, dest: &TypedRegister, self_int: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_int_min( &mut self, dest: &TypedRegister, self_int: &TypedRegister, other_int: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_int_max( &mut self, dest: &TypedRegister, self_int: &TypedRegister, other_int: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_int_clamp( &mut self, dest: &TypedRegister, self_int: &TypedRegister, min_int: &TypedRegister, max_int: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_int_abs( &mut self, dest: &TypedRegister, self_int: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_int_to_float( &mut self, dest: &TypedRegister, self_int: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_int_to_string( &mut self, dest: &TypedRegister, self_int: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn bool_to_string( &mut self, dest_str: &TypedRegister, self_bool: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn byte_to_string( &mut self, dest_str: &TypedRegister, self_bool: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_codepoint_to_string( &mut self, dest_str: &TypedRegister, self_char: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_string_to_string( &mut self, dest_str: &TypedRegister, self_str: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_string_starts_with( &mut self, dest_bool: &TypedRegister, source_str: &TypedRegister, other_str: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_string_to_int( &mut self, dest_tuple: &TypedRegister, source_str: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_string_to_float( &mut self, dest_tuple: &TypedRegister, source_str: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_to_string( &mut self, dest_str: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_round( &mut self, dest_int: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_floor( &mut self, dest_int: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_sqrt( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_sign( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_abs( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_prnd( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_sin( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_cos( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_acos( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_asin( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_atan2( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_min( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, other: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_max( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, max_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_float_clamp( &mut self, dest_float: &TypedRegister, self_float: &TypedRegister, min_float: &TypedRegister, max_float: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_sparse_iter_init( &mut self, iterator_target: &TypedRegister, pointer_to_sparse_header: &TypedRegister, node: &Node, comment: &str, )

Source

pub fn add_sparse_iter_next_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Source

pub fn add_sparse_iter_next_pair_placeholder( &mut self, iterator_target: &TypedRegister, closure_variable: &TypedRegister, closure_variable_b: &TypedRegister, node: &Node, comment: &str, ) -> PatchPosition

Auto Trait Implementations§

§

impl<'a> Freeze for InstructionBuilder<'a>

§

impl<'a> RefUnwindSafe for InstructionBuilder<'a>

§

impl<'a> Send for InstructionBuilder<'a>

§

impl<'a> Sync for InstructionBuilder<'a>

§

impl<'a> Unpin for InstructionBuilder<'a>

§

impl<'a> !UnwindSafe for InstructionBuilder<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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.

Source§

impl<T> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more