pub struct ConfigClass { /* private fields */ }Expand description
Config class
Implementations§
Source§impl ConfigClass
impl ConfigClass
Sourcepub fn parent(&self) -> Option<&str>
pub fn parent(&self) -> Option<&str>
The parent class name, or None when the class has no parent.
Sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
Whether this is an external declaration (class X;).
Sourcepub fn is_deletion(&self) -> bool
pub fn is_deletion(&self) -> bool
Whether this is a deletion (delete X;).
Sourcepub fn entries(&self) -> impl Iterator<Item = (&str, &ConfigEntry)>
pub fn entries(&self) -> impl Iterator<Item = (&str, &ConfigEntry)>
The entries in file order; empty for external classes and deletions.
Sourcepub fn get(&self, name: &str) -> Option<&ConfigEntry>
pub fn get(&self, name: &str) -> Option<&ConfigEntry>
Looks up an entry by name, ASCII case-insensitively like the game.
Returns the first entry with that name; use ConfigClass::entries to see every entry
when a config defines a name twice. A delete X; entry comes back
as ConfigEntry::ClassEntry with ConfigClass::is_deletion true.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigClass
impl RefUnwindSafe for ConfigClass
impl Send for ConfigClass
impl Sync for ConfigClass
impl Unpin for ConfigClass
impl UnsafeUnpin for ConfigClass
impl UnwindSafe for ConfigClass
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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