Struct Skill

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

Implementations§

Source§

impl Skill

Source

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

Source

pub fn inputs(&self) -> &Vec<Variable>

Source

pub fn add_input(&mut self, input: Variable)

Source

pub fn outputs(&self) -> &Vec<Variable>

Source

pub fn add_output(&mut self, output: Variable)

Source

pub fn preconditions(&self) -> &Vec<Precondition>

Source

pub fn add_precondition(&mut self, precondition: Precondition) -> PreconditionId

Source

pub fn get_precondition(&self, id: PreconditionId) -> Option<&Precondition>

Source

pub fn start(&self) -> &Vec<Effect>

Source

pub fn set_start(&mut self, effects: Vec<Effect>)

Source

pub fn invariants(&self) -> &Vec<Invariant>

Source

pub fn add_invariant(&mut self, invariant: Invariant) -> InvariantId

Source

pub fn get_invariant(&self, id: InvariantId) -> Option<&Invariant>

Source

pub fn progress(&self) -> &Option<Progress>

Source

pub fn set_progress(&mut self, progress: Progress)

Source

pub fn interrupt(&self) -> &Option<Interrupt>

Source

pub fn set_interrupt(&mut self, interrupt: Interrupt)

Source

pub fn successes(&self) -> &Vec<Success>

Source

pub fn add_success(&mut self, success: Success) -> SuccessId

Source

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

Source

pub fn failures(&self) -> &Vec<Failure>

Source

pub fn add_failure(&mut self, failure: Failure) -> FailureId

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn resolve_type( &mut self, map: &HashMap<String, TypeId>, ) -> Result<(), RlError>

Source

pub fn resolve_resource( &mut self, map: &HashMap<String, ResourceId>, ) -> Result<(), RlError>

Source

pub fn resolve_state( &mut self, map: &HashMap<String, StateId>, ) -> Result<(), RlError>

Trait Implementations§

Source§

impl Clone for Skill

Source§

fn clone(&self) -> Skill

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 Skill

Source§

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

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

impl Display for Skill

Source§

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

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

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

Source§

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

Source§

impl GetFromId<InvariantId, Invariant> for Skill

Source§

impl GetFromId<PreconditionId, Precondition> for Skill

Source§

impl GetFromId<SkillId, Skill> for Skillset

Source§

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

Source§

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

Source§

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

Source§

impl Named<SkillId> for Skill

Source§

fn id(&self) -> SkillId

Source§

fn set_id(&mut self, id: SkillId)

Source§

fn name(&self) -> &str

Source§

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

Source§

fn naming(&self) -> Naming

Source§

impl ToLang for Skill

Source§

fn to_lang(&self, skillset: &Skillset) -> String

Auto Trait Implementations§

§

impl Freeze for Skill

§

impl RefUnwindSafe for Skill

§

impl Send for Skill

§

impl Sync for Skill

§

impl Unpin for Skill

§

impl UnwindSafe for Skill

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.