pub struct SkillSetBuilder(SkillSet);Tuple Fields§
§0: SkillSetImplementations§
Source§impl SkillSetBuilder
impl SkillSetBuilder
Sourcepub fn from_asset_expect(asset_specifier: &str) -> Self
pub fn from_asset_expect(asset_specifier: &str) -> Self
Creates SkillSetBuilder from asset_specifier
Sourcepub fn with_asset_expect(self, asset_specifier: &str) -> Self
pub fn with_asset_expect(self, asset_specifier: &str) -> Self
Applies asset_specifier with needed skill tree
Sourcepub fn from_preset(preset: Preset) -> Self
pub fn from_preset(preset: Preset) -> Self
Creates SkillSetBuilder for given preset
Sourcepub fn with_preset(self, preset: Preset) -> Self
pub fn with_preset(self, preset: Preset) -> Self
Applies preset
Sourcepub fn with_skill(self, skill: Skill, level: u16) -> Self
pub fn with_skill(self, skill: Skill, level: u16) -> Self
§Panics
will panic only in tests
- If added skill doesn’t have any group
- If added skill already applied
- If added skill wasn’t applied at the end
pub fn build(self) -> SkillSet
Trait Implementations§
Source§impl Default for SkillSetBuilder
impl Default for SkillSetBuilder
Source§fn default() -> SkillSetBuilder
fn default() -> SkillSetBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SkillSetBuilder
impl RefUnwindSafe for SkillSetBuilder
impl Send for SkillSetBuilder
impl Sync for SkillSetBuilder
impl Unpin for SkillSetBuilder
impl UnwindSafe for SkillSetBuilder
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default and panics on an error case.