[−][src]Struct s3wf2::document::CharacterSet
Contains characters metadata.
Methods
impl CharacterSet
[src]
pub fn new() -> CharacterSet
[src]
Creates a new instance.
pub fn add_male(
&mut self,
id: &str,
name: &str
) -> Result<(), SemanticErrorKind>
[src]
&mut self,
id: &str,
name: &str
) -> Result<(), SemanticErrorKind>
pub fn add_female(
&mut self,
id: &str,
name: &str
) -> Result<(), SemanticErrorKind>
[src]
&mut self,
id: &str,
name: &str
) -> Result<(), SemanticErrorKind>
pub fn add_mob(&mut self, id: &str, name: &str) -> Result<(), SemanticErrorKind>
[src]
pub fn add_custom(
&mut self,
id: &str,
name: &str,
color: &str
) -> Result<(), SemanticErrorKind>
[src]
&mut self,
id: &str,
name: &str,
color: &str
) -> Result<(), SemanticErrorKind>
Adds a custom color character.
Parameters
id
- The reference IDname
- The name displayed in documentcolor
- A colorcode, which consists of 3 or 6 hexadecimal digits
pub fn get(&self, id: &str) -> Option<&CharacterType>
[src]
Gets the character type related to the ID.
pub fn characters(&self) -> impl Iterator<Item = (&String, &CharacterType)>
[src]
Returns character iterator. The order is guaranteed to be consistent.
Trait Implementations
impl Default for CharacterSet
[src]
fn default() -> CharacterSet
[src]
impl Display for CharacterSet
[src]
Auto Trait Implementations
impl RefUnwindSafe for CharacterSet
impl Send for CharacterSet
impl Sync for CharacterSet
impl Unpin for CharacterSet
impl UnwindSafe for CharacterSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,