Struct Vm

Source
pub struct Vm {
    pub registers: [u32; 256],
    pub debug: Debug,
    pub debug_stats_enabled: bool,
    pub debug_opcodes_enabled: bool,
    pub debug_operations_enabled: bool,
    pub state: VmState,
    /* private fields */
}

Fields§

§registers: [u32; 256]§debug: Debug§debug_stats_enabled: bool§debug_opcodes_enabled: bool§debug_operations_enabled: bool§state: VmState

Implementations§

Source§

impl Vm

Source

pub fn execute_grid_init( &mut self, dest_reg: u8, element_size_reg: u8, width_lower: u8, width_upper: u8, height_lower: u8, height_upper: u8, )

Source

pub fn execute_grid_get_entry_addr( &mut self, dest_reg: u8, self_addr_reg: u8, x_reg: u8, y_reg: u8, element_lower: u8, element_upper: u8, )

Source§

impl Vm

Source

pub const ELEMENT_COUNT_FACTOR: f32 = 1.5f32

Source

pub fn get_map_header(&self, header_reg: u8) -> *mut MapHeader

Source

pub fn get_map_header_mut(&self, addr: u32) -> *mut MapHeader

Source

pub fn get_map_header_const(&self, addr: u32) -> *const MapHeader

Source

pub fn read_map_header(&self, header_reg: u8) -> (MapHeader, u32)

Source

pub fn read_map_header_from_heap( map_header_heap_addr: u32, heap: &Memory, ) -> MapHeader

Source

pub fn execute_map_open_addressing_get_entry_location( &mut self, dst_entry_address: u8, self_map_header_reg: u8, key_source: u8, )

Source

pub fn execute_map_open_addressing_init( &mut self, self_map_header_reg: u8, logical_limit_immediate_lower: u8, logical_limit_immediate_upper: u8, key_size_reg: u8, key_alignment: u8, value_size_reg: u8, value_alignment: u8, )

Source

pub fn execute_map_open_addressing_get_or_reserve_entry( &mut self, dst_entry_address: u8, self_map_header_reg: u8, key_source_ptr_reg: u8, )

Source

pub fn execute_map_open_addressing_has( &mut self, dest_reg: u8, self_const_map_header_reg: u8, key_source_reg: u8, )

Source

pub fn execute_map_overwrite( &mut self, target_map_header_reg: u8, source_map_header_reg: u8, )

Source

pub fn execute_map_open_addressing_remove( &mut self, self_map_header_reg: u8, key_source_reg: u8, )

Source

pub fn get_map_iterator_header_ptr_from_reg( &self, map_iterator_reg: u8, ) -> *mut MapIterator

Source

pub fn execute_map_iter_next_pair( &mut self, map_iterator_header_reg: u8, target_key_reg: u8, target_value_reg: u8, branch_offset_lower: u8, branch_offset_upper: u8, )

Source

pub fn execute_map_iter_next( &mut self, map_iterator_header_reg: u8, target_value_reg: u8, branch_offset_lower: u8, branch_offset_upper: u8, )

Source§

impl Vm

Source

pub fn get_range_header_ptr_from_reg(&self, range_reg: u8) -> *mut RangeHeader

Source

pub fn range_header_from_reg(&self, range_reg: u8) -> RangeHeader

Source

pub fn range_iterator_ptr_from_reg( &self, range_iterator_reg: u8, ) -> *mut RangeIterator

Source

pub fn execute_range_init( &mut self, range_target_reg: u8, min_reg: u8, max_reg: u8, is_inclusive: u8, )

Source

pub fn execute_range_iter_init( &mut self, target_iterator_reg: u8, range_header_reg: u8, )

Source

pub fn execute_range_iter_next( &mut self, target_iterator_reg: u8, target_int_reg: u8, jmp_offset_lower: u8, jmp_offset_upper: u8, )

Source§

impl Vm

Source

pub fn execute_sparse_init( &mut self, dest_reg: u8, element_size_0: u8, element_size_1: u8, element_size_2: u8, element_size_3: u8, capacity_0: u8, capacity_1: u8, )

Source

pub fn execute_sparse_add_get_entry_addr( &mut self, dest_entry_addr_reg: u8, dest_handle_reg: u8, sparse_ptr_reg: u8, memory_size_0: u8, memory_size_1: u8, memory_size_2: u8, memory_size_3: u8, )

Source

pub fn execute_sparse_get_entry_addr( &mut self, dest_entry_addr_reg: u8, sparse_ptr_reg: u8, int_handle_reg: u8, memory_size_lower: u8, memory_size_upper: u8, )

Source

pub fn execute_sparse_remove(&mut self, sparse_ptr_reg: u8, int_handle_reg: u8)

Source

pub fn execute_sparse_is_alive( &mut self, dest_reg_bool: u8, sparse_ptr_reg: u8, int_handle_reg: u8, )

Source

pub fn get_sparse_iterator_header_ptr_from_reg( &self, map_iterator_reg: u8, ) -> *mut SparseIterator

Source

pub fn execute_sparse_iter_next_pair( &mut self, sparse_iterator_header_reg: u8, target_key_reg: u8, target_value_reg: u8, branch_offset_lower: u8, branch_offset_upper: u8, )

Source

pub fn execute_sparse_iter_next( &mut self, sparse_iterator_header_reg: u8, target_entry_address_reg: u8, branch_offset_lower: u8, branch_offset_upper: u8, )

Source§

impl Vm

Source

pub fn get_string_iterator_header_ptr_from_reg( &self, vec_iterator_reg: u8, ) -> *mut StringIterator

Source

pub fn execute_string_append( &mut self, target_string_reg: u8, string_a: u8, string_b: u8, )

Source

pub fn execute_string_cmp(&mut self, dest_reg: u8, string_a: u8, string_b: u8)

Source

pub fn execute_string_to_string(&mut self, dest_reg: u8, source_string: u8)

Return the same string but with quotes.

Source

pub fn read_string(&self, heap_addr: u32, heap: &Memory) -> &str

Source

pub fn execute_string_iter_init( &mut self, target_string_iterator_header_reg: u8, string_header_reg: u8, )

Source

pub fn execute_string_iter_next( &mut self, string_iterator_header_reg: u8, target_variable: u8, branch_offset_lower: u8, branch_offset_upper: u8, )

Source

pub fn execute_string_iter_next_pair( &mut self, string_iterator_header_reg: u8, target_key_reg: u8, target_value_reg: u8, branch_offset_lower: u8, branch_offset_upper: u8, )

Source§

impl Vm

Source

pub fn get_vec_iterator_header_ptr_from_reg( &self, vec_iterator_reg: u8, ) -> *mut VecIterator

Source

pub fn execute_array_init( &mut self, target_vec_ptr_reg: u8, capacity_lower: u8, capacity_upper: u8, element_size_0: u8, element_size_1: u8, element_size_2: u8, element_size_3: u8, )

Source

pub fn execute_vec_cmp( &mut self, bool_target_reg: u8, left_vec_ptr_reg: u8, right_vec_ptr_reg: u8, )

Source

pub fn execute_vec_copy( &mut self, target_vec_ptr_reg: u8, source_vec_ptr_reg: u8, )

Source

pub fn execute_vec_copy_range( &mut self, target_vec_ptr_reg: u8, source_vec_ptr_reg: u8, range_reg: u8, )

Source

pub fn execute_vec_init( &mut self, target_vec_ptr_reg: u8, capacity_lower: u8, capacity_upper: u8, element_size_0: u8, element_size_1: u8, element_size_2: u8, element_size_3: u8, )

Source

pub fn execute_vec_iter_init( &mut self, target_vec_iterator_header_reg: u8, vec_header_reg: u8, )

Source

pub fn execute_vec_iter_next( &mut self, vec_iterator_header_reg: u8, target_variable: u8, branch_offset_lower: u8, branch_offset_upper: u8, )

Source

pub fn execute_vec_iter_next_pair( &mut self, vec_iterator_header_reg: u8, target_key_reg: u8, target_value_reg: u8, branch_offset_lower: u8, branch_offset_upper: u8, )

Source

pub fn vec_header_from_heap(heap: &Memory, heap_offset: u32) -> VecHeader

Source

pub fn read_vec_header_from_ptr_reg(&self, vec_header_ptr_reg: u8) -> VecHeader

Source

pub fn get_vec_header_ptr_from_reg( &self, vec_header_ptr_reg: u8, ) -> *mut VecHeader

Source

pub fn execute_vec_get( &mut self, element_target_reg: u8, vec_header_ptr_reg: u8, int_reg: u8, )

Source

pub fn execute_vec_set( &mut self, vec_header_ptr_reg: u8, int_index_reg: u8, item_ptr_reg: u8, )

Source

pub fn execute_vec_push_addr( &mut self, destination_entry_addr_reg: u8, src_vec_header_ptr_reg: u8, )

Source

pub fn execute_vec_pop(&mut self, dst_reg: u8, vec_header_ptr_reg: u8)

Source

pub fn execute_vec_remove_index( &mut self, vec_header_ptr_reg: u8, remove_index_reg: u8, )

Source§

impl Vm

Source

pub const fn is_execution_complete(&self) -> bool

Source§

impl Vm

Source

pub fn new(instructions: Vec<BinaryInstruction>, setup: VmSetup) -> Self

Source

pub const fn memory(&self) -> &Memory

Source

pub fn memory_mut(&mut self) -> &mut Memory

Source

pub fn step( &mut self, host_function_callback: &mut dyn HostFunctionCallback, ) -> bool

Source

pub fn execute_internal( &mut self, host_function_callback: &mut dyn HostFunctionCallback, )

Source

pub const fn set_return_register_address(&mut self, r0_addr: u32)

Source

pub fn set_register_pointer_addr_for_parameter( &mut self, register: u8, addr: u32, )

Source

pub fn set_stack_start(&mut self, addr: usize)

Source

pub fn resume(&mut self, host_function_callback: &mut dyn HostFunctionCallback)

Source

pub fn execute_from_ip( &mut self, ip: &InstructionPosition, host_function_callback: &mut dyn HostFunctionCallback, )

Source

pub const fn set_pc(&mut self, pc: &InstructionPosition)

Source

pub const fn pc(&self) -> usize

Source

pub fn fp(&self) -> usize

Source

pub fn sp(&self) -> usize

Source

pub fn call_stack(&self) -> &[CallFrame]

Source

pub fn frame_memory(&self) -> &[u8]

Source

pub fn heap_memory(&self) -> &[u8]

Source

pub fn constant_memory(&self) -> &[u8]

Source

pub fn all_memory_up_to(&self, offset: usize) -> &[u8]

Source

pub fn constant_size(&self) -> usize

Source

pub fn instructions(&self) -> &[BinaryInstruction]

Source

pub fn reset(&mut self)

Source

pub fn reset_stack_and_heap_to_constant_limit(&mut self)

Source

pub fn reset_call_stack(&mut self)

Source

pub fn reset_debug(&mut self)

Source

pub fn frame_offset(&self) -> usize

Source

pub fn load_bytecode(&mut self, instructions: Vec<BinaryInstruction>)

Source

pub fn internal_trap(&mut self, trap_code: TrapCode)

Source

pub fn execute_ldb_from_base_ptr_and_offset( &mut self, dst_reg: u8, base_ptr_reg: u8, offset_0: u8, offset_1: u8, offset_2: u8, offset_3: u8, )

Source

pub fn execute_ldw_from_base_ptr_and_offset( &mut self, dst_reg: u8, base_ptr_reg: u8, offset_0: u8, offset_1: u8, offset_2: u8, offset_3: u8, )

Source

pub fn execute_ldh_from_base_ptr_and_offset( &mut self, dst_reg: u8, base_ptr_reg: u8, offset_0: u8, offset_1: u8, offset_2: u8, offset_3: u8, )

Source

pub fn execute_ld_regs_from_frame( &mut self, start_reg: u8, offset_0: u8, offset_1: u8, offset_2: u8, offset_3: u8, count: u8, )

Source

pub fn execute_ld_regs_from_frame_using_mask( &mut self, reg_mask: u8, offset_0: u8, offset_1: u8, offset_2: u8, offset_3: u8, )

Source

pub fn execute_frame_memory_clear( &mut self, dst_pointer_0: u8, dst_pointer_1: u8, dst_pointer_2: u8, dst_pointer_3: u8, memory_size_0: u8, memory_size_1: u8, memory_size_2: u8, memory_size_3: u8, )

Source

pub fn get_const_ptr_from_reg(&self, reg: u8) -> *const u8

Source

pub fn get_const_ptr_from_reg_with_offset( &self, reg: u8, offset: u32, ) -> *const u8

Source

pub fn get_ptr_from_reg(&self, reg: u8) -> *mut u8

Source

pub fn get_ptr_and_addr_from_reg(&self, reg: u8) -> (*mut u8, u32)

Source

pub fn get_ptr_from_reg_with_offset(&self, reg: u8, offset: u32) -> *mut u8

Auto Trait Implementations§

§

impl Freeze for Vm

§

impl RefUnwindSafe for Vm

§

impl !Send for Vm

§

impl !Sync for Vm

§

impl Unpin for Vm

§

impl UnwindSafe for Vm

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