pub struct ActionDefinition { /* private fields */ }Expand description
Implementations§
Source§impl ActionDefinition
impl ActionDefinition
Sourcepub const fn new(
symbol: ActionSymbol,
parameters: TypedVariables,
precondition: PreconditionGoalDescriptions,
effect: Option<Effects>,
) -> Self
pub const fn new( symbol: ActionSymbol, parameters: TypedVariables, precondition: PreconditionGoalDescriptions, effect: Option<Effects>, ) -> Self
Creates a new action definition from its name, parameters, preconditions and optional effect.
Sourcepub const fn symbol(&self) -> &ActionSymbol
pub const fn symbol(&self) -> &ActionSymbol
Gets the action’s name.
Sourcepub const fn parameters(&self) -> &TypedVariables
pub const fn parameters(&self) -> &TypedVariables
Gets the action’s parameters, i.e. the typed variables from :parameters.
Sourcepub const fn precondition(&self) -> &PreconditionGoalDescriptions
pub const fn precondition(&self) -> &PreconditionGoalDescriptions
Gets the action’s preconditions, from :precondition; empty if the action has none.
Trait Implementations§
Source§impl AsRef<ActionSymbol> for ActionDefinition
impl AsRef<ActionSymbol> for ActionDefinition
Source§fn as_ref(&self) -> &ActionSymbol
fn as_ref(&self) -> &ActionSymbol
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for ActionDefinition
impl Clone for ActionDefinition
Source§impl Debug for ActionDefinition
impl Debug for ActionDefinition
Source§impl<'de> Deserialize<'de> for ActionDefinition
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ActionDefinition
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ActionDefinition> for StructureDef
impl From<ActionDefinition> for StructureDef
Source§fn from(value: ActionDefinition) -> Self
fn from(value: ActionDefinition) -> Self
Converts to this type from the input type.
Source§impl Parser for ActionDefinition
Available on crate feature parser only.
impl Parser for ActionDefinition
Available on crate feature
parser only.Source§type Item = ActionDefinition
type Item = ActionDefinition
The parsed value;
Self except for
DurationConstraint, which may be empty.Source§impl PartialEq for ActionDefinition
impl PartialEq for ActionDefinition
Source§impl Serialize for ActionDefinition
Available on crate feature serde only.
impl Serialize for ActionDefinition
Available on crate feature
serde only.impl StructuralPartialEq for ActionDefinition
Source§impl Visitor<ActionDefinition, RcDoc<'static>> for PrettyRenderer
Available on crate feature pretty only.
impl Visitor<ActionDefinition, RcDoc<'static>> for PrettyRenderer
Available on crate feature
pretty only.Source§fn visit(&self, value: &ActionDefinition) -> RcDoc<'static>
fn visit(&self, value: &ActionDefinition) -> RcDoc<'static>
Visits
value and returns the result.Auto Trait Implementations§
impl Forget for ActionDefinition
impl Freeze for ActionDefinition
impl Move for ActionDefinition
impl RefUnwindSafe for ActionDefinition
impl Send for ActionDefinition
impl Sync for ActionDefinition
impl Unpin for ActionDefinition
impl UnsafeUnpin for ActionDefinition
impl UnwindSafe for ActionDefinition
Blanket Implementations§
Source§impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
Source§fn accept_mut(&self, v: &mut V) -> O
fn accept_mut(&self, v: &mut V) -> O
Lets the mutable visitor
v visit self.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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Pretty for Twhere
T: PrettyVisit,
impl<T> Pretty for Twhere
T: PrettyVisit,
Source§impl<T> PrettyVisit for T
impl<T> PrettyVisit for T
Source§fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
Available on crate feature
pretty only.Builds the document for
self with the renderer r.