pub struct TwizzlerTarget {
recv: Receiver<Event<MultiThreadStopReason<u64>>>,
inner: Arc<TargetInner>,
mon_t: Option<JoinHandle<()>>,
chan_t: Option<JoinHandle<()>>,
t_t: Option<JoinHandle<()>>,
thread_repr_id: ObjID,
libs: Vec<(String, ObjID, u64, Box<LinkMap>)>,
}
Fields§
§recv: Receiver<Event<MultiThreadStopReason<u64>>>
§inner: Arc<TargetInner>
§mon_t: Option<JoinHandle<()>>
§chan_t: Option<JoinHandle<()>>
§t_t: Option<JoinHandle<()>>
§thread_repr_id: ObjID
§libs: Vec<(String, ObjID, u64, Box<LinkMap>)>
Implementations§
Source§impl TwizzlerTarget
impl TwizzlerTarget
pub fn new(comp: CompartmentHandle, conn: Sender<u8>) -> Self
fn mem_access( &mut self, addr: <<TwizzlerTarget as Target>::Arch as Arch>::Usize, len: usize, prot: Protections, ) -> TargetResult<usize, Self>
fn mem_slice( &mut self, addr: <<TwizzlerTarget as Target>::Arch as Arch>::Usize, len: usize, ) -> TargetResult<&[u8], Self>
fn mem_slice_mut( &mut self, addr: <<TwizzlerTarget as Target>::Arch as Arch>::Usize, len: usize, ) -> TargetResult<&mut [u8], Self>
fn mem_slice_mut_writable( &mut self, addr: <<TwizzlerTarget as Target>::Arch as Arch>::Usize, len: usize, ) -> Result<RefSliceMut<'_, u8>, TwzError>
fn get_thread_repr_id(&self, _tid: Tid) -> ObjID
Trait Implementations§
Source§impl Breakpoints for TwizzlerTarget
impl Breakpoints for TwizzlerTarget
Source§fn support_sw_breakpoint(&mut self) -> Option<SwBreakpointOps<'_, Self>>
fn support_sw_breakpoint(&mut self) -> Option<SwBreakpointOps<'_, Self>>
Support for setting / removing software breakpoints.
Source§fn support_hw_breakpoint(&mut self) -> Option<HwBreakpointOps<'_, Self>>
fn support_hw_breakpoint(&mut self) -> Option<HwBreakpointOps<'_, Self>>
Support for setting / removing hardware breakpoints.
Source§fn support_hw_watchpoint(&mut self) -> Option<HwWatchpointOps<'_, Self>>
fn support_hw_watchpoint(&mut self) -> Option<HwWatchpointOps<'_, Self>>
Support for setting / removing hardware watchpoints.
Source§impl Drop for TwizzlerTarget
impl Drop for TwizzlerTarget
Source§impl ExecFile for TwizzlerTarget
impl ExecFile for TwizzlerTarget
Source§impl HostIo for TwizzlerTarget
impl HostIo for TwizzlerTarget
Source§fn support_open(&mut self) -> Option<HostIoOpenOps<'_, Self>>
fn support_open(&mut self) -> Option<HostIoOpenOps<'_, Self>>
Support
open
operation.Source§fn support_close(&mut self) -> Option<HostIoCloseOps<'_, Self>>
fn support_close(&mut self) -> Option<HostIoCloseOps<'_, Self>>
Support
close
operation.Source§fn support_pread(&mut self) -> Option<HostIoPreadOps<'_, Self>>
fn support_pread(&mut self) -> Option<HostIoPreadOps<'_, Self>>
Support
pread
operation.Source§fn support_fstat(&mut self) -> Option<HostIoFstatOps<'_, Self>>
fn support_fstat(&mut self) -> Option<HostIoFstatOps<'_, Self>>
Support
fstat
operation.Source§fn support_readlink(&mut self) -> Option<HostIoReadlinkOps<'_, Self>>
fn support_readlink(&mut self) -> Option<HostIoReadlinkOps<'_, Self>>
Support
readlink
operation.§fn support_pwrite(
&mut self,
) -> Option<&mut dyn HostIoPwrite<Arch = Self::Arch, Error = Self::Error>>
fn support_pwrite( &mut self, ) -> Option<&mut dyn HostIoPwrite<Arch = Self::Arch, Error = Self::Error>>
Support
pwrite
operation.§fn support_unlink(
&mut self,
) -> Option<&mut dyn HostIoUnlink<Arch = Self::Arch, Error = Self::Error>>
fn support_unlink( &mut self, ) -> Option<&mut dyn HostIoUnlink<Arch = Self::Arch, Error = Self::Error>>
Support
unlink
operation.§fn support_setfs(
&mut self,
) -> Option<&mut dyn HostIoSetfs<Arch = Self::Arch, Error = Self::Error>>
fn support_setfs( &mut self, ) -> Option<&mut dyn HostIoSetfs<Arch = Self::Arch, Error = Self::Error>>
Support
setfs
operation.Source§impl HostIoClose for TwizzlerTarget
impl HostIoClose for TwizzlerTarget
Source§impl HostIoFstat for TwizzlerTarget
impl HostIoFstat for TwizzlerTarget
Source§impl HostIoOpen for TwizzlerTarget
impl HostIoOpen for TwizzlerTarget
Source§impl HostIoPread for TwizzlerTarget
impl HostIoPread for TwizzlerTarget
Source§impl HostIoReadlink for TwizzlerTarget
impl HostIoReadlink for TwizzlerTarget
Source§impl LibrariesSvr4 for TwizzlerTarget
impl LibrariesSvr4 for TwizzlerTarget
Source§impl MultiThreadBase for TwizzlerTarget
impl MultiThreadBase for TwizzlerTarget
Source§fn read_registers(
&mut self,
regs: &mut <Self::Arch as Arch>::Registers,
tid: Tid,
) -> TargetResult<(), Self>
fn read_registers( &mut self, regs: &mut <Self::Arch as Arch>::Registers, tid: Tid, ) -> TargetResult<(), Self>
Read the target’s registers. Read more
Source§fn write_registers(
&mut self,
regs: &<Self::Arch as Arch>::Registers,
tid: Tid,
) -> TargetResult<(), Self>
fn write_registers( &mut self, regs: &<Self::Arch as Arch>::Registers, tid: Tid, ) -> TargetResult<(), Self>
Write the target’s registers. Read more
Source§fn read_addrs(
&mut self,
start_addr: <Self::Arch as Arch>::Usize,
data: &mut [u8],
tid: Tid,
) -> TargetResult<usize, Self>
fn read_addrs( &mut self, start_addr: <Self::Arch as Arch>::Usize, data: &mut [u8], tid: Tid, ) -> TargetResult<usize, Self>
Read bytes from the specified address range and return the number of
bytes that were read. Read more
Source§fn write_addrs(
&mut self,
start_addr: <Self::Arch as Arch>::Usize,
data: &[u8],
tid: Tid,
) -> TargetResult<(), Self>
fn write_addrs( &mut self, start_addr: <Self::Arch as Arch>::Usize, data: &[u8], tid: Tid, ) -> TargetResult<(), Self>
Write bytes to the specified address range. Read more
Source§fn list_active_threads(
&mut self,
thread_is_active: &mut dyn FnMut(Tid),
) -> Result<(), Self::Error>
fn list_active_threads( &mut self, thread_is_active: &mut dyn FnMut(Tid), ) -> Result<(), Self::Error>
List all currently active threads. Read more
Source§fn support_resume(&mut self) -> Option<MultiThreadResumeOps<'_, Self>>
fn support_resume(&mut self) -> Option<MultiThreadResumeOps<'_, Self>>
Support for resuming the target (e.g: via
continue
or step
)§fn support_single_register_access(
&mut self,
) -> Option<&mut dyn SingleRegisterAccess<NonZero<usize>, Arch = Self::Arch, Error = Self::Error>>
fn support_single_register_access( &mut self, ) -> Option<&mut dyn SingleRegisterAccess<NonZero<usize>, Arch = Self::Arch, Error = Self::Error>>
Support for single-register access.
See
SingleRegisterAccess
for more details. Read more§fn is_thread_alive(&mut self, tid: NonZero<usize>) -> Result<bool, Self::Error>
fn is_thread_alive(&mut self, tid: NonZero<usize>) -> Result<bool, Self::Error>
Check if the specified thread is alive. Read more
§fn support_thread_extra_info(
&mut self,
) -> Option<&mut dyn ThreadExtraInfo<Arch = Self::Arch, Error = Self::Error>>
fn support_thread_extra_info( &mut self, ) -> Option<&mut dyn ThreadExtraInfo<Arch = Self::Arch, Error = Self::Error>>
Support for providing thread extra information.
Source§impl MultiThreadResume for TwizzlerTarget
impl MultiThreadResume for TwizzlerTarget
Source§fn clear_resume_actions(&mut self) -> Result<(), Self::Error>
fn clear_resume_actions(&mut self) -> Result<(), Self::Error>
Clear all previously set resume actions.
Source§fn set_resume_action_continue(
&mut self,
tid: Tid,
signal: Option<Signal>,
) -> Result<(), Self::Error>
fn set_resume_action_continue( &mut self, tid: Tid, signal: Option<Signal>, ) -> Result<(), Self::Error>
Continue the specified thread. Read more
Source§fn support_single_step(&mut self) -> Option<MultiThreadSingleStepOps<'_, Self>>
fn support_single_step(&mut self) -> Option<MultiThreadSingleStepOps<'_, Self>>
Support for optimized single stepping.
§fn support_range_step(
&mut self,
) -> Option<&mut dyn MultiThreadRangeStepping<Arch = Self::Arch, Error = Self::Error>>
fn support_range_step( &mut self, ) -> Option<&mut dyn MultiThreadRangeStepping<Arch = Self::Arch, Error = Self::Error>>
Support for optimized range stepping.
§fn support_reverse_step(
&mut self,
) -> Option<&mut dyn ReverseStep<NonZero<usize>, Arch = Self::Arch, Error = Self::Error>>
fn support_reverse_step( &mut self, ) -> Option<&mut dyn ReverseStep<NonZero<usize>, Arch = Self::Arch, Error = Self::Error>>
Support for reverse stepping a target.
§fn support_reverse_cont(
&mut self,
) -> Option<&mut dyn ReverseCont<NonZero<usize>, Arch = Self::Arch, Error = Self::Error>>
fn support_reverse_cont( &mut self, ) -> Option<&mut dyn ReverseCont<NonZero<usize>, Arch = Self::Arch, Error = Self::Error>>
Support for reverse continuing a target.
Source§impl MultiThreadSingleStep for TwizzlerTarget
impl MultiThreadSingleStep for TwizzlerTarget
Source§fn set_resume_action_step(
&mut self,
tid: Tid,
signal: Option<Signal>,
) -> Result<(), Self::Error>
fn set_resume_action_step( &mut self, tid: Tid, signal: Option<Signal>, ) -> Result<(), Self::Error>
Single step the specified target thread. Read more
Source§impl SwBreakpoint for TwizzlerTarget
impl SwBreakpoint for TwizzlerTarget
Source§fn add_sw_breakpoint(
&mut self,
addr: <Self::Arch as Arch>::Usize,
_kind: <Self::Arch as Arch>::BreakpointKind,
) -> TargetResult<bool, Self>
fn add_sw_breakpoint( &mut self, addr: <Self::Arch as Arch>::Usize, _kind: <Self::Arch as Arch>::BreakpointKind, ) -> TargetResult<bool, Self>
Add a new software breakpoint. Read more
Source§fn remove_sw_breakpoint(
&mut self,
addr: <Self::Arch as Arch>::Usize,
kind: <Self::Arch as Arch>::BreakpointKind,
) -> TargetResult<bool, Self>
fn remove_sw_breakpoint( &mut self, addr: <Self::Arch as Arch>::Usize, kind: <Self::Arch as Arch>::BreakpointKind, ) -> TargetResult<bool, Self>
Remove an existing software breakpoint. Read more
Source§impl Target for TwizzlerTarget
impl Target for TwizzlerTarget
Source§fn base_ops(&mut self) -> BaseOps<'_, Self::Arch, Self::Error>
fn base_ops(&mut self) -> BaseOps<'_, Self::Arch, Self::Error>
Base operations such as reading/writing from memory/registers,
stopping/resuming the target, etc…. Read more
Source§fn guard_rail_implicit_sw_breakpoints(&self) -> bool
fn guard_rail_implicit_sw_breakpoints(&self) -> bool
If the target supports resumption, but hasn’t implemented explicit
support for software breakpoints (via
SwBreakpoints
), notify the user
that the GDB client may set “implicit” software breakpoints by
rewriting the target’s instruction stream. Read moreSource§fn support_exec_file(&mut self) -> Option<ExecFileOps<'_, Self>>
fn support_exec_file(&mut self) -> Option<ExecFileOps<'_, Self>>
Support for reading the current exec-file.
Source§fn support_host_io(&mut self) -> Option<HostIoOps<'_, Self>>
fn support_host_io(&mut self) -> Option<HostIoOps<'_, Self>>
Support for Host I/O operations.
Source§fn support_libraries_svr4(&mut self) -> Option<LibrariesSvr4Ops<'_, Self>>
fn support_libraries_svr4(&mut self) -> Option<LibrariesSvr4Ops<'_, Self>>
Support for reading a list of libraries for SVR4 (System-V/Unix)
platforms.
§fn use_no_ack_mode(&self) -> bool
fn use_no_ack_mode(&self) -> bool
Enable/disable support for activating “no ack mode”. Read more
§fn use_x_upcase_packet(&self) -> bool
fn use_x_upcase_packet(&self) -> bool
Enable/disable using the more efficient
X
packet to write to target
memory (as opposed to the basic M
packet). Read more§fn use_resume_stub(&self) -> bool
fn use_resume_stub(&self) -> bool
Whether
gdbstub
should provide a “stub” resume
implementation on
targets without support for resumption. Read more§fn use_rle(&self) -> bool
fn use_rle(&self) -> bool
Enable/Disable the use of run-length encoding on outgoing packets. Read more
§fn use_target_description_xml(&self) -> bool
fn use_target_description_xml(&self) -> bool
Whether to send a target description XML to the client. Read more
§fn use_lldb_register_info(&self) -> bool
fn use_lldb_register_info(&self) -> bool
(LLDB extension) Whether to send register information to the client. Read more
§fn support_breakpoints(
&mut self,
) -> Option<&mut dyn Breakpoints<Arch = Self::Arch, Error = Self::Error>>
fn support_breakpoints( &mut self, ) -> Option<&mut dyn Breakpoints<Arch = Self::Arch, Error = Self::Error>>
Support for setting / removing breakpoints.
§fn support_monitor_cmd(
&mut self,
) -> Option<&mut dyn MonitorCmd<Arch = Self::Arch, Error = Self::Error>>
fn support_monitor_cmd( &mut self, ) -> Option<&mut dyn MonitorCmd<Arch = Self::Arch, Error = Self::Error>>
Support for handling custom GDB
monitor
commands.§fn support_extended_mode(
&mut self,
) -> Option<&mut dyn ExtendedMode<Arch = Self::Arch, Error = Self::Error>>
fn support_extended_mode( &mut self, ) -> Option<&mut dyn ExtendedMode<Arch = Self::Arch, Error = Self::Error>>
Support for Extended Mode operations.
§fn support_section_offsets(
&mut self,
) -> Option<&mut dyn SectionOffsets<Arch = Self::Arch, Error = Self::Error>>
fn support_section_offsets( &mut self, ) -> Option<&mut dyn SectionOffsets<Arch = Self::Arch, Error = Self::Error>>
Support for handling requests to get the target’s current section (or
segment) offsets.
§fn support_tracepoints(
&mut self,
) -> Option<&mut dyn Tracepoints<Arch = Self::Arch, Error = Self::Error>>
fn support_tracepoints( &mut self, ) -> Option<&mut dyn Tracepoints<Arch = Self::Arch, Error = Self::Error>>
Support for setting / removing tracepoints.
§fn support_target_description_xml_override(
&mut self,
) -> Option<&mut dyn TargetDescriptionXmlOverride<Arch = Self::Arch, Error = Self::Error>>
fn support_target_description_xml_override( &mut self, ) -> Option<&mut dyn TargetDescriptionXmlOverride<Arch = Self::Arch, Error = Self::Error>>
Support for overriding the target description XML specified by
Target::Arch
.§fn support_lldb_register_info_override(
&mut self,
) -> Option<&mut dyn LldbRegisterInfoOverride<Arch = Self::Arch, Error = Self::Error>>
fn support_lldb_register_info_override( &mut self, ) -> Option<&mut dyn LldbRegisterInfoOverride<Arch = Self::Arch, Error = Self::Error>>
(LLDB extension) Support for overriding the register info specified by
Target::Arch
.§fn support_memory_map(
&mut self,
) -> Option<&mut dyn MemoryMap<Arch = Self::Arch, Error = Self::Error>>
fn support_memory_map( &mut self, ) -> Option<&mut dyn MemoryMap<Arch = Self::Arch, Error = Self::Error>>
Support for reading the target’s memory map.
§fn support_flash_operations(
&mut self,
) -> Option<&mut dyn Flash<Arch = Self::Arch, Error = Self::Error>>
fn support_flash_operations( &mut self, ) -> Option<&mut dyn Flash<Arch = Self::Arch, Error = Self::Error>>
Support for flash memory operations.
§fn support_catch_syscalls(
&mut self,
) -> Option<&mut dyn CatchSyscalls<Arch = Self::Arch, Error = Self::Error>>
fn support_catch_syscalls( &mut self, ) -> Option<&mut dyn CatchSyscalls<Arch = Self::Arch, Error = Self::Error>>
Support for setting / removing syscall catchpoints.
§fn support_auxv(
&mut self,
) -> Option<&mut dyn Auxv<Arch = Self::Arch, Error = Self::Error>>
fn support_auxv( &mut self, ) -> Option<&mut dyn Auxv<Arch = Self::Arch, Error = Self::Error>>
Support for reading the target’s Auxillary Vector.
Auto Trait Implementations§
impl !Crossing for TwizzlerTarget
impl Freeze for TwizzlerTarget
impl !ObjSafe for TwizzlerTarget
impl !RefUnwindSafe for TwizzlerTarget
impl !Send for TwizzlerTarget
impl !StoreCopy for TwizzlerTarget
impl !Sync for TwizzlerTarget
impl Unpin for TwizzlerTarget
impl !UnwindSafe for TwizzlerTarget
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Set the foreground color generically Read more
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Set the background color generically. Read more
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to magenta
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Change the foreground color to the terminal default
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Change the background color to the terminal default
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Change the foreground color to bright black
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Change the background color to bright black
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Change the foreground color to bright red
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Change the background color to bright red
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Change the foreground color to bright green
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Change the background color to bright green
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Change the foreground color to bright yellow
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Change the background color to bright yellow
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Change the foreground color to bright blue
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Change the background color to bright blue
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright magenta
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright magenta
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright purple
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright purple
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Change the foreground color to bright cyan
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Change the background color to bright cyan
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Change the foreground color to bright white
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Change the background color to bright white
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Make the text blink (but fast!)
Hide the text
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Cross out the text
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either [
OwoColorize::fg
] or
a color-specific method, such as [OwoColorize::green
], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either [
OwoColorize::bg
] or
a color-specific method, such as [OwoColorize::on_yellow
], Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the background color to a specific RGB value.
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Sets the foreground color to an RGB value.
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Sets the background color to an RGB value.