Enum pddl_parser::domain::action::Action
source · pub enum Action {
Simple(SimpleAction),
Durative(DurativeAction),
}Expand description
Enum to represent either an Action or a DurativeAction.
Variants§
Simple(SimpleAction)
An Action wrapper around a simple action. See SimpleAction.
Durative(DurativeAction)
An Action wrapper around a durative action. See DurativeAction.
Implementations§
source§impl Action
impl Action
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Get the name of the action. This is the same as the name of the simple or durative action.
sourcepub fn parameters(&self) -> &[TypedParameter]
pub fn parameters(&self) -> &[TypedParameter]
Get the parameters of the action. This is the same as the parameters of the simple or durative action.
sourcepub fn precondition(&self) -> Option<Expression>
pub fn precondition(&self) -> Option<Expression>
Get the precondition of the action. This is the same as the precondition of the simple or durative action.
sourcepub fn effect(&self) -> Expression
pub fn effect(&self) -> Expression
Get the effect of the action. This is the same as the effect of the simple or durative action.
sourcepub fn parse(
input: TokenStream<'_>
) -> IResult<TokenStream<'_>, Action, ParserError>
pub fn parse( input: TokenStream<'_> ) -> IResult<TokenStream<'_>, Action, ParserError>
Parse an action from a token stream.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<DurativeAction> for Action
impl From<DurativeAction> for Action
source§fn from(action: DurativeAction) -> Self
fn from(action: DurativeAction) -> Self
Converts to this type from the input type.
source§impl From<SimpleAction> for Action
impl From<SimpleAction> for Action
source§fn from(action: SimpleAction) -> Self
fn from(action: SimpleAction) -> Self
Converts to this type from the input type.
source§impl Ord for Action
impl Ord for Action
source§impl PartialEq for Action
impl PartialEq for Action
source§impl PartialOrd for Action
impl PartialOrd for Action
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Action
impl StructuralPartialEq for Action
Auto Trait Implementations§
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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