Skip to main content

Theme

Struct Theme 

Source
pub struct Theme {
Show 22 fields pub time: Colour, pub uint: Colour, pub sint: Colour, pub float: Colour, pub text: Colour, pub binary: Colour, pub colour: Colour, pub crypto: Colour, pub opcode: Colour, pub renderable: Colour, pub scene_graph: Colour, pub pass: Colour, pub fail: Colour, pub warn: Colour, pub hint: Colour, pub punct: Colour, pub label: Colour, pub comment: Colour, pub size: Colour, pub header: Colour, pub tree: Colour, pub highlight_bg: Option<Colour>,
}
Expand description

Theme for VSF inspector output

All colours are RGB triplets (r, g, b) where each component is 0-255.

Fields§

§time: Colour

Time types (e, eu, ei, ef5, ef6)

§uint: Colour

Unsigned integers (u, u3-u7, y, z, b, L)

§sint: Colour

Signed integers (i, i3-i7)

§float: Colour

Floating point (f5, f6, s44, c44)

§text: Colour

Text/strings (x)

§binary: Colour

Binary data (q)

§colour: Colour

Colour types (r*, ra, rw)

§crypto: Colour

Crypto types (h*, k*, g*, sig)

§opcode: Colour

Opcodes ({ab})

§renderable: Colour

Renderable objects (ro*)

§scene_graph: Colour

Scene graph types (vt)

§pass: Colour

Verification passed (✓)

§fail: Colour

Verification failed (✗)

§warn: Colour

Warnings

§hint: Colour

Hints/descriptions

§punct: Colour

Punctuation/structure (⦉⦊, {}, <>, etc.)

§label: Colour

Field labels and names (section counts, field names, punctuation in displays)

§comment: Colour

Comments and annotations

§size: Colour

Byte sizes and counts (section sizes, child counts)

§header: Colour

Section headers

§tree: Colour

Tree structure characters (╮, ╰, │, ─)

§highlight_bg: Option<Colour>

Background highlight (for selected items)

Implementations§

Source§

impl Theme

Source

pub fn dark() -> Self

Default dark theme (current VSF inspector colours)

Source

pub fn light() -> Self

Light theme (for light terminal backgrounds)

Source

pub fn solarized_dark() -> Self

Solarized Dark theme

Source

pub fn nord() -> Self

Nord theme (popular dark theme)

Source

pub fn gruvbox_dark() -> Self

Gruvbox Dark theme

Source

pub fn by_name(name: &str) -> Option<Self>

Get theme by name

Source

pub fn available() -> Vec<&'static str>

List available theme names

Trait Implementations§

Source§

impl Clone for Theme

Source§

fn clone(&self) -> Theme

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Theme

Source§

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

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

impl Default for Theme

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Theme

§

impl RefUnwindSafe for Theme

§

impl Send for Theme

§

impl Sync for Theme

§

impl Unpin for Theme

§

impl UnsafeUnpin for Theme

§

impl UnwindSafe for Theme

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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.