Struct veloren_common::skillset_builder::SkillSetBuilder
source · pub struct SkillSetBuilder(SkillSet);
Tuple Fields§
§0: SkillSet
Implementations§
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 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>
§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.