Struct dnd_character::classes::Class
source · pub struct Class(_, pub ClassProperties);Expand description
The key is the index of the class from https://www.dnd5eapi.co/api/classes
Tuple Fields§
§1: ClassPropertiesImplementations§
source§impl Class
impl Class
pub async fn get_spellcasting_ability_index(&self) -> Result<String, ApiError>
pub async fn get_spellcasting_slots( &self ) -> Result<Option<LevelSpellcasting>, ApiError>
pub async fn set_level( &mut self, new_level: u8 ) -> Result<Vec<ChoosableCustomLevelFeature>, ApiError>
pub async fn get_levels_features( &self, from_level: Option<u8>, passive: bool ) -> Result<Vec<String>, ApiError>
pub fn apply_option(&mut self, option: ChoosableCustomLevelFeatureOption)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Class
impl<'de> Deserialize<'de> for Class
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 Class
impl PartialEq for Class
impl Eq for Class
Auto Trait Implementations§
impl RefUnwindSafe for Class
impl Send for Class
impl Sync for Class
impl Unpin for Class
impl UnwindSafe for Class
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
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.