pub enum DurativeActionFluentExpression {
Assign(AssignOp, FunctionHead, Box<DurativeActionFluentExpression>),
BinaryOp(BinaryOp, Box<DurativeActionFluentExpression>, Box<DurativeActionFluentExpression>),
MultiOp(MultiOp, Box<DurativeActionFluentExpression>, Vec<DurativeActionFluentExpression>),
Negative(Box<DurativeActionFluentExpression>),
Duration,
FluentExpression(FluentExpression),
}Expand description
§Usage
Used by DurativeActionFluentExpression itself, as well as DurativeActionFunctionAssignment.
Variants§
Assign(AssignOp, FunctionHead, Box<DurativeActionFluentExpression>)
An assignment, (<assign-op> <f-head> <f-exp-da>). Not part of the PDDL 3.1
<f-exp-da> grammar; the parser never produces it.
BinaryOp(BinaryOp, Box<DurativeActionFluentExpression>, Box<DurativeActionFluentExpression>)
A binary operation, (<binary-op> <f-exp-da> <f-exp-da>).
MultiOp(MultiOp, Box<DurativeActionFluentExpression>, Vec<DurativeActionFluentExpression>)
An operation over two or more operands, (<multi-op> <f-exp-da> <f-exp-da>+),
with at least two in the Vec; see multi_op for fewer.
Negative(Box<DurativeActionFluentExpression>)
A negation, (- <f-exp-da>).
Duration
§Requirements
Requires Duration Inequalities.
FluentExpression(FluentExpression)
A regular fluent expression, <f-exp>.
Implementations§
Source§impl DurativeActionFluentExpression
impl DurativeActionFluentExpression
Sourcepub fn new_duration() -> Self
pub fn new_duration() -> Self
Creates the ?duration expression.
Sourcepub fn binary_op(
op: BinaryOp,
lhs: DurativeActionFluentExpression,
rhs: DurativeActionFluentExpression,
) -> Self
pub fn binary_op( op: BinaryOp, lhs: DurativeActionFluentExpression, rhs: DurativeActionFluentExpression, ) -> Self
Creates a binary operation, (<binary-op> <f-exp-da> <f-exp-da>).
Sourcepub fn new_binary_op(
op: BinaryOp,
lhs: DurativeActionFluentExpression,
rhs: DurativeActionFluentExpression,
) -> Self
pub fn new_binary_op( op: BinaryOp, lhs: DurativeActionFluentExpression, rhs: DurativeActionFluentExpression, ) -> Self
Creates a binary operation, (<binary-op> <f-exp-da> <f-exp-da>).
Sourcepub fn multi_op<I: IntoIterator<Item = DurativeActionFluentExpression>>(
op: MultiOp,
lhs: DurativeActionFluentExpression,
rhs: I,
) -> Self
pub fn multi_op<I: IntoIterator<Item = DurativeActionFluentExpression>>( op: MultiOp, lhs: DurativeActionFluentExpression, rhs: I, ) -> Self
Creates an operation over two or more operands, (<multi-op> <f-exp-da> <f-exp-da>+).
(<multi-op> a b) is a binary operation and (<multi-op> a) isn’t PDDL, so
with one operand in rhs this returns the equal BinaryOp, and with none
it returns lhs. The result then prints and parses back to an equal value.
Sourcepub fn new_multi_op<I: IntoIterator<Item = DurativeActionFluentExpression>>(
op: MultiOp,
lhs: DurativeActionFluentExpression,
rhs: I,
) -> Self
pub fn new_multi_op<I: IntoIterator<Item = DurativeActionFluentExpression>>( op: MultiOp, lhs: DurativeActionFluentExpression, rhs: I, ) -> Self
Creates an operation over two or more operands, (<multi-op> <f-exp-da> <f-exp-da>+).
Sourcepub fn negative(value: DurativeActionFluentExpression) -> Self
pub fn negative(value: DurativeActionFluentExpression) -> Self
Creates a negation, (- <f-exp-da>).
Sourcepub fn new_negative(value: DurativeActionFluentExpression) -> Self
pub fn new_negative(value: DurativeActionFluentExpression) -> Self
Creates a negation, (- <f-exp-da>).
Sourcepub const fn fluent_expression(f_head: FluentExpression) -> Self
pub const fn fluent_expression(f_head: FluentExpression) -> Self
Wraps a regular fluent expression.
Sourcepub fn new_f_exp(f_head: FluentExpression) -> Self
pub fn new_f_exp(f_head: FluentExpression) -> Self
Wraps a regular fluent expression.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DurativeActionFluentExpression
Available on crate feature serde only.
impl<'de> Deserialize<'de> for DurativeActionFluentExpression
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>
Source§impl From<FluentExpression> for DurativeActionFluentExpression
impl From<FluentExpression> for DurativeActionFluentExpression
Source§fn from(value: FluentExpression) -> Self
fn from(value: FluentExpression) -> Self
Source§impl Parser for DurativeActionFluentExpression
Available on crate feature parser only.
impl Parser for DurativeActionFluentExpression
parser only.Source§type Item = DurativeActionFluentExpression
type Item = DurativeActionFluentExpression
Self except for
DurationConstraint, which may be empty.Source§impl Serialize for DurativeActionFluentExpression
Available on crate feature serde only.
impl Serialize for DurativeActionFluentExpression
serde only.impl StructuralPartialEq for DurativeActionFluentExpression
Source§impl Visitor<DurativeActionFluentExpression, RcDoc<'static>> for PrettyRenderer
Available on crate feature pretty only.
impl Visitor<DurativeActionFluentExpression, RcDoc<'static>> for PrettyRenderer
pretty only.Source§fn visit(&self, value: &DurativeActionFluentExpression) -> RcDoc<'static>
fn visit(&self, value: &DurativeActionFluentExpression) -> RcDoc<'static>
value and returns the result.Auto Trait Implementations§
impl Forget for DurativeActionFluentExpression
impl Freeze for DurativeActionFluentExpression
impl Move for DurativeActionFluentExpression
impl RefUnwindSafe for DurativeActionFluentExpression
impl Send for DurativeActionFluentExpression
impl Sync for DurativeActionFluentExpression
impl Unpin for DurativeActionFluentExpression
impl UnsafeUnpin for DurativeActionFluentExpression
impl UnwindSafe for DurativeActionFluentExpression
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
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
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>
pretty only.self with the renderer r.