Struct Skillset

Source
pub struct Skillset { /* private fields */ }

Implementations§

Source§

impl Skillset

Source

pub fn new<S: Into<String>>(name: S, position: Option<Position>) -> Self

Source

pub fn name(&self) -> &str

Source

pub fn position(&self) -> Option<Position>

Source

pub fn types(&self) -> &Vec<RlType>

Source

pub fn add_type(&mut self, rl_type: RlType) -> TypeId

Source

pub fn get_type(&self, id: TypeId) -> Option<&RlType>

Source

pub fn type_map(&self) -> HashMap<String, TypeId>

Source

pub fn data(&self) -> &Vec<Data>

Source

pub fn get_data(&self, id: DataId) -> Option<&Data>

Source

pub fn add_data(&mut self, data: Data) -> DataId

Source

pub fn resources(&self) -> &Vec<Resource>

Source

pub fn get_resource(&self, id: ResourceId) -> Option<&Resource>

Source

pub fn add_resource(&mut self, resource: Resource) -> ResourceId

Source

pub fn resource_map(&self) -> HashMap<String, ResourceId>

Source

pub fn get_state(&self, id: StateId) -> Option<&State>

Source

pub fn state_map(&self) -> HashMap<String, StateId>

Source

pub fn events(&self) -> &Vec<Event>

Source

pub fn get_event(&self, id: EventId) -> Option<&Event>

Source

pub fn add_event(&mut self, event: Event) -> EventId

Source

pub fn skills(&self) -> &Vec<Skill>

Source

pub fn get_skill(&self, id: SkillId) -> Option<&Skill>

Source

pub fn add_skill(&mut self, skill: Skill) -> SkillId

Source

pub fn type_naming(&self) -> Vec<Naming>

Source

pub fn data_naming(&self) -> Vec<Naming>

Source

pub fn resource_naming(&self) -> Vec<Naming>

Source

pub fn event_naming(&self) -> Vec<Naming>

Source

pub fn skill_naming(&self) -> Vec<Naming>

Source

pub fn duplicate(&self) -> Result<(), RlError>

Source

pub fn resolve(&mut self) -> Result<(), RlError>

Source

pub fn resolve_type(&mut self) -> Result<(), RlError>

Source

pub fn resolve_resource(&mut self) -> Result<(), RlError>

Source

pub fn resolve_state(&mut self) -> Result<(), RlError>

Trait Implementations§

Source§

impl Clone for Skillset

Source§

fn clone(&self) -> Skillset

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Skillset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Skillset

Source§

fn default() -> Skillset

Returns the “default value” for a type. Read more
Source§

impl Display for Skillset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl GetFromId<DataId, Data> for Skillset

Source§

fn get(&self, id: DataId) -> Option<&Data>

Source§

impl GetFromId<EventId, Event> for Skillset

Source§

fn get(&self, id: EventId) -> Option<&Event>

Source§

impl GetFromId<FailureId, Terminate<FailureId>> for Skillset

Source§

fn get(&self, id: FailureId) -> Option<&Failure>

Source§

impl GetFromId<InvariantId, Invariant> for Skillset

Source§

impl GetFromId<PreconditionId, Precondition> for Skillset

Source§

impl GetFromId<ResourceId, Resource> for Skillset

Source§

impl GetFromId<SkillId, Skill> for Skillset

Source§

fn get(&self, id: SkillId) -> Option<&Skill>

Source§

impl GetFromId<StateId, State> for Skillset

Source§

fn get(&self, id: StateId) -> Option<&State>

Source§

impl GetFromId<SuccessId, Terminate<SuccessId>> for Skillset

Source§

fn get(&self, id: SuccessId) -> Option<&Success>

Source§

impl GetFromId<TypeId, RlType> for Skillset

Source§

fn get(&self, id: TypeId) -> Option<&RlType>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.