#[non_exhaustive]pub enum SpellDescFragment {
Text {
value: String,
},
Value {
value: String,
raw: f64,
},
Duration {
value: String,
raw_ms: f64,
},
ColorStart {
color: String,
},
ColorEnd,
Icon {
spell_id: u32,
path: String,
},
SpellName {
spell_id: u32,
name: String,
},
Embedded {
spell_id: u32,
fragments: Vec<SpellDescFragment>,
},
Unresolved {
token: String,
},
RawToken {
value: String,
},
}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.
Trait Implementations§
Source§impl Clone for SpellDescFragment
impl Clone for SpellDescFragment
Source§fn clone(&self) -> SpellDescFragment
fn clone(&self) -> SpellDescFragment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpellDescFragment
impl Debug for SpellDescFragment
Source§impl<'de> Deserialize<'de> for SpellDescFragment
impl<'de> Deserialize<'de> for SpellDescFragment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SpellDescFragment
impl PartialEq for SpellDescFragment
Source§impl Serialize for SpellDescFragment
impl Serialize for SpellDescFragment
Source§impl Tsify for SpellDescFragment
impl Tsify for SpellDescFragment
const DECL: &'static str = "export type SpellDescFragment = { kind: \"text\"; value: string } | { kind: \"value\"; value: string; raw: number } | { kind: \"duration\"; value: string; raw_ms: number } | { kind: \"colorStart\"; color: string } | { kind: \"colorEnd\" } | { kind: \"icon\"; spell_id: number; path: string } | { kind: \"spellName\"; spell_id: number; name: string } | { kind: \"embedded\"; spell_id: number; fragments: SpellDescFragment[] } | { kind: \"unresolved\"; token: string } | { kind: \"rawToken\"; value: string };"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
impl StructuralPartialEq for SpellDescFragment
Auto Trait Implementations§
impl Freeze for SpellDescFragment
impl RefUnwindSafe for SpellDescFragment
impl Send for SpellDescFragment
impl Sync for SpellDescFragment
impl Unpin for SpellDescFragment
impl UnsafeUnpin for SpellDescFragment
impl UnwindSafe for SpellDescFragment
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