pub enum FunctionHead {
Simple(FunctionSymbol),
WithTerms(FunctionSymbol, Vec<Term>),
}Expand description
A function declaration.
§Requirements
Requires Numeric Fluents.
§Usage
Used by FluentExpression, PrimitiveEffect, TimedEffect
and DurativeActionFunctionAssignment.
Variants§
Simple(FunctionSymbol)
A function without arguments, <function-symbol> or (<function-symbol>).
WithTerms(FunctionSymbol, Vec<Term>)
A function applied to terms, (<function-symbol> <term>*).
Implementations§
Source§impl FunctionHead
impl FunctionHead
Sourcepub const fn new(symbol: FunctionSymbol) -> Self
pub const fn new(symbol: FunctionSymbol) -> Self
Creates a function head without arguments.
Sourcepub fn with_terms<I: IntoIterator<Item = Term>>(
symbol: FunctionSymbol,
terms: I,
) -> Self
pub fn with_terms<I: IntoIterator<Item = Term>>( symbol: FunctionSymbol, terms: I, ) -> Self
Creates a function head applied to the given terms.
Sourcepub fn new_with_terms<I: IntoIterator<Item = Term>>(
symbol: FunctionSymbol,
terms: I,
) -> Self
pub fn new_with_terms<I: IntoIterator<Item = Term>>( symbol: FunctionSymbol, terms: I, ) -> Self
Creates a function head applied to the given terms.
Trait Implementations§
Source§impl Clone for FunctionHead
impl Clone for FunctionHead
Source§impl Debug for FunctionHead
impl Debug for FunctionHead
Source§impl<'de> Deserialize<'de> for FunctionHead
Available on crate feature serde only.
impl<'de> Deserialize<'de> for FunctionHead
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
impl Eq for FunctionHead
Source§impl Parser for FunctionHead
Available on crate feature parser only.
impl Parser for FunctionHead
Available on crate feature
parser only.Source§type Item = FunctionHead
type Item = FunctionHead
The parsed value;
Self except for
DurationConstraint, which may be empty.Source§impl PartialEq for FunctionHead
impl PartialEq for FunctionHead
Source§impl Serialize for FunctionHead
Available on crate feature serde only.
impl Serialize for FunctionHead
Available on crate feature
serde only.impl StructuralPartialEq for FunctionHead
Source§impl Visitor<FunctionHead, RcDoc<'static>> for PrettyRenderer
Available on crate feature pretty only.
impl Visitor<FunctionHead, RcDoc<'static>> for PrettyRenderer
Available on crate feature
pretty only.Source§fn visit(&self, value: &FunctionHead) -> RcDoc<'static>
fn visit(&self, value: &FunctionHead) -> RcDoc<'static>
Visits
value and returns the result.Auto Trait Implementations§
impl Forget for FunctionHead
impl Freeze for FunctionHead
impl Move for FunctionHead
impl RefUnwindSafe for FunctionHead
impl Send for FunctionHead
impl Sync for FunctionHead
impl Unpin for FunctionHead
impl UnsafeUnpin for FunctionHead
impl UnwindSafe for FunctionHead
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.