SpellWin

Struct SpellWin 

Source
pub struct SpellWin { /* private fields */ }
Expand description

SpellWin is the main type for implementing widgets, it covers various properties and trait implementation, thus providing various features.

§Panics

The constructor method conjure_spells will panic if the number of WindowConfs provided is not equal to the amount of widgets that are initialised in the scope. The solution to avoid panic is to add more let _ = WidgetName::new().unwrap(); for all the widgets/window components you are declaring in your slint files and adding WindowConfs for in SpellMultiWinHandler.

Implementations§

Source§

impl SpellWin

Source

pub fn get_handler(&mut self) -> Sender<Handle>

retrive the sender handle to pass Handle events to the windows.

Source

pub fn invoke_spell(name: &str, window_conf: WindowConf) -> Self

This function is called to create a instance of window. This window is then finally called by cast_spell event loop.

§Panics

This function needs to be called “before” initialising the slint window to avoid panicing of this function.

Source

pub fn hide(&self)

Hides the layer (aka the widget) if it is visible in screen.

Source

pub fn show_again(&mut self)

Brings back the layer (aka the widget) back on screen if it is hidden.

Source

pub fn toggle(&mut self)

Hides the widget if visible or shows the widget back if hidden.

Source

pub fn add_input_region(&self, x: i32, y: i32, width: i32, height: i32)

This function adds specific rectangular regions of your complete layer to receive input events from pointer and/or touch. The coordinates are in surface local format from top left corener. By default, The whole layer is considered for input events. Adding existing areas again as input region has no effect. This function combined with transparent base widgets can be used to mimic resizable widgets.

Source

pub fn subtract_input_region(&self, x: i32, y: i32, width: i32, height: i32)

This function subtracts specific rectangular regions of your complete layer from receiving input events from pointer and/or touch. The coordinates are in surface local format from top left corener. By default, The whole layer is considered for input events. Substracting input areas which are already not input regions has no effect.

Source

pub fn add_opaque_region(&self, x: i32, y: i32, width: i32, height: i32)

This function marks specific rectangular regions of your complete layer as opaque. This can result in specific optimisations from your wayland compositor, setting this property is optional. The coordinates are in surface local format from top left corener. Not adding opaque regions in it has no isuues but adding transparent regions of layer as opaque can cause weird behaviour and glitches.

Source

pub fn subtract_opaque_region(&self, x: i32, y: i32, width: i32, height: i32)

This function removes specific rectangular regions of your complete layer from being opaque. This can result in specific optimisations from your wayland compositor, setting this property is optional. The coordinates are in surface local format from top left corener.

Source

pub fn grab_focus(&self)

Grabs the focus of keyboard. Can be used in combination with other functions to make the widgets keyboard navigable.

Source

pub fn remove_focus(&self)

Removes the focus of keyboard from window if it currently has it.

Trait Implementations§

Source§

impl CompositorHandler for SpellWin

Source§

fn scale_factor_changed( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _surface: &WlSurface, _new_factor: i32, )

The surface has either been moved into or out of an output and the output has a different scale factor.
Source§

fn transform_changed( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _surface: &WlSurface, _new_transform: Transform, )

The surface has either been moved into or out of an output and the output has different transform.
Source§

fn frame( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, _surface: &WlSurface, _time: u32, )

A frame callback has been completed. Read more
Source§

fn surface_enter( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _surface: &WlSurface, _output: &WlOutput, )

The surface has entered an output.
Source§

fn surface_leave( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _surface: &WlSurface, _output: &WlOutput, )

The surface has left an output.
Source§

impl Debug for SpellWin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Dispatch<WlCallback, WlSurface> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlCallback, event: <WlCallback as Proxy>::Event, data: &WlSurface, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlCompositor, GlobalData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlCompositor, event: <WlCompositor as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlKeyboard, KeyboardData<SpellWin>> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlKeyboard, event: <WlKeyboard as Proxy>::Event, data: &KeyboardData<SpellWin>, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlOutput, OutputData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlOutput, event: <WlOutput as Proxy>::Event, data: &OutputData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlPointer, PointerData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlPointer, event: <WlPointer as Proxy>::Event, data: &PointerData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlRegistry, GlobalListContents> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlRegistry, event: <WlRegistry as Proxy>::Event, data: &GlobalListContents, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlSeat, SeatData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlSeat, event: <WlSeat as Proxy>::Event, data: &SeatData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlShm, GlobalData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlShm, event: <WlShm as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlSurface, SurfaceData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WlSurface, event: <WlSurface as Proxy>::Event, data: &SurfaceData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WpCursorShapeDeviceV1, GlobalData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WpCursorShapeDeviceV1, event: <WpCursorShapeDeviceV1 as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WpCursorShapeManagerV1, GlobalData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &WpCursorShapeManagerV1, event: <WpCursorShapeManagerV1 as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<ZwlrLayerShellV1, GlobalData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &ZwlrLayerShellV1, event: <ZwlrLayerShellV1 as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<ZwlrLayerSurfaceV1, LayerSurfaceData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &ZwlrLayerSurfaceV1, event: <ZwlrLayerSurfaceV1 as Proxy>::Event, data: &LayerSurfaceData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<ZxdgOutputManagerV1, GlobalData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &ZxdgOutputManagerV1, event: <ZxdgOutputManagerV1 as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<ZxdgOutputV1, OutputData> for SpellWin

Source§

fn event( state: &mut Self, proxy: &ZxdgOutputV1, event: <ZxdgOutputV1 as Proxy>::Event, data: &OutputData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl KeyboardHandler for SpellWin

Source§

fn enter( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _surface: &WlSurface, _serial: u32, _raw: &[u32], _keysyms: &[Keysym], )

The keyboard has entered a surface. Read more
Source§

fn leave( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _surface: &WlSurface, _serial: u32, )

The keyboard has left a surface. Read more
Source§

fn press_key( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _serial: u32, event: KeyEvent, )

A key has been pressed on the keyboard. Read more
Source§

fn release_key( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _serial: u32, event: KeyEvent, )

A key has been released. Read more
Source§

fn update_modifiers( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _serial: u32, _modifiers: Modifiers, _raw_modifiers: RawModifiers, _layout: u32, )

Keyboard modifiers have been updated. Read more
Source§

fn update_repeat_info( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _info: RepeatInfo, )

The keyboard has updated the rate and delay between repeating key inputs. Read more
Source§

fn repeat_key( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _serial: u32, _event: KeyEvent, )

A key has been previously pressed and is now repeating. Read more
Source§

fn update_keymap( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _keymap: Keymap<'_>, )

Keyboard keymap has been updated. Read more
Source§

impl LayerShellHandler for SpellWin

Source§

fn closed( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _layer: &LayerSurface, )

The layer surface has been closed. Read more
Source§

fn configure( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, _layer: &LayerSurface, _configure: LayerSurfaceConfigure, _serial: u32, )

Apply a suggested surface change. Read more
Source§

impl OutputHandler for SpellWin

Source§

fn output_state(&mut self) -> &mut OutputState

Source§

fn new_output( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _output: WlOutput, )

A new output has been advertised.
Source§

fn update_output( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _output: WlOutput, )

An existing output has changed.
Source§

fn output_destroyed( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _output: WlOutput, )

An output is no longer advertised. Read more
Source§

impl PointerHandler for SpellWin

Source§

fn pointer_frame( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, _pointer: &WlPointer, events: &[PointerEvent], )

One or more pointer events are available. Read more
Source§

impl ProvidesRegistryState for SpellWin

Source§

fn registry(&mut self) -> &mut RegistryState

Returns a mutable reference to the registry state.
Source§

fn runtime_add_global( &mut self, conn: &Connection, qh: &QueueHandle<Self>, name: u32, interface: &str, version: u32, )

Called when a new global has been advertised by the compositor. Read more
Source§

fn runtime_remove_global( &mut self, conn: &Connection, qh: &QueueHandle<Self>, name: u32, interface: &str, )

Called when a global has been destroyed by the compositor.
Source§

impl SeatHandler for SpellWin

Source§

fn seat_state(&mut self) -> &mut SeatState

Source§

fn new_seat(&mut self, _: &Connection, _: &QueueHandle<Self>, _: WlSeat)

A new seat has been created. Read more
Source§

fn new_capability( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, seat: WlSeat, capability: Capability, )

A new capability is available on the seat. Read more
Source§

fn remove_capability( &mut self, _conn: &Connection, _: &QueueHandle<Self>, _: WlSeat, capability: Capability, )

A capability has been removed from the seat. Read more
Source§

fn remove_seat(&mut self, _: &Connection, _: &QueueHandle<Self>, _: WlSeat)

A seat has been removed. Read more
Source§

impl ShmHandler for SpellWin

Source§

fn shm_state(&mut self) -> &mut Shm

Auto Trait Implementations§

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
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<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

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

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

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

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

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
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