Skip to main content

Warning

Enum Warning 

Source
#[non_exhaustive]
pub enum Warning { Newer { path: String, found: u64, known: u64, }, BadStamp { path: String, reason: String, }, Renamed { from: String, to: String, contract: u64, }, Unknown { path: String, base: String, kept: bool, }, Invalid { path: String, reason: String, }, Unchecked { base: String, }, NotCached { file: String, reason: String, }, Font { file: String, reason: String, }, FontMissing { path: String, family: String, fallback: String, }, }
Expand description

Something a token file loaded with, short of failing: the file still loads, and the warning says what was read otherwise than written.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Newer

The file is stamped with a newer format or contract than this egui-pop knows: it is read best-effort.

Fields

§path: String

The stamp’s part ($extensions.org.egui-pop.format.contract).

§found: u64
§known: u64
§

BadStamp

The stamp cannot be read: the file is read as current.

Fields

§path: String
§reason: String
§

Renamed

A token renamed since the contract the file was written for: read under its new name.

Fields

§from: String
§contract: u64

The contract version that dropped the former name.

§

Unknown

A token the base theme does not have: kept as the file’s own, or left out (the theme editor changes its base’s tokens only).

Fields

§path: String
§base: String
§kept: bool
§

Invalid

A token whose value does not load over the base theme: left out, the base theme’s value kept.

Fields

§path: String
§reason: String
§

Unchecked

The base theme ($extends) is not known yet: the tokens were not checked; resolving the theme reports what is wrong.

Fields

§base: String
§

NotCached

The file’s compiled form could not be kept in the cache (crate::cache): it was read uncached, and is compiled again next time.

Fields

§file: String
§reason: String
§

Font

A file of a theme package (crate::package) not read: a face missing, not a font or outside the package (the families naming it fall back), or a second token file.

Fields

§file: String
§reason: String
§

FontMissing

A font family a token names (font.family.ui) not found where the theme is loaded (a system face not installed on this machine): the theme still loads, and fallback, the next name of the list found, draws instead.

Fields

§path: String
§family: String
§fallback: String

Implementations§

Source§

impl Warning

Source

pub fn path(&self) -> Option<&str>

The token, or the part of the stamp, the warning is about.

Source

pub fn left_out(&self) -> bool

Whether the token the warning is about was left out of the file.

Trait Implementations§

Source§

impl Clone for Warning

Source§

fn clone(&self) -> Warning

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Warning

Source§

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

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

impl Display for Warning

Source§

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

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

impl PartialEq for Warning

Source§

fn eq(&self, other: &Warning) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Warning

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.