pub struct Spell {
pub raw_spell: String,
pub component: String,
pub component_target: String,
pub effects: String,
pub area: String,
pub focus: String,
pub with_template: bool,
pub scroll_spells: Option<Vec<Spell>>,
}Fields§
§raw_spell: String§component: String§component_target: String§effects: String§area: String§focus: String§with_template: bool§scroll_spells: Option<Vec<Spell>>Implementations§
Source§impl Spell
impl Spell
Sourcepub fn new(
raw_spell: &str,
shared_spells: &HashSet<String>,
scrolls: &Option<HashMap<String, Vec<String>>>,
) -> Result<Option<Self>, GrimoireCssError>
pub fn new( raw_spell: &str, shared_spells: &HashSet<String>, scrolls: &Option<HashMap<String, Vec<String>>>, ) -> Result<Option<Self>, GrimoireCssError>
Example input: “md__{_>_p}hover:display=none”
pub fn generate_spells_from_classes( css_classes: Vec<String>, shared_spells: &HashSet<String>, scrolls: &Option<HashMap<String, Vec<String>>>, ) -> Result<Vec<Spell>, GrimoireCssError>
Trait Implementations§
impl Eq for Spell
impl StructuralPartialEq for Spell
Auto Trait Implementations§
impl Freeze for Spell
impl RefUnwindSafe for Spell
impl Send for Spell
impl Sync for Spell
impl Unpin for Spell
impl UnwindSafe for Spell
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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