pub enum DurationConstraint {
Single(SimpleDurationConstraint),
All(Vec<SimpleDurationConstraint>),
}Expand description
§Usage
Used by DurativeActionDefinition.
Variants§
Single(SimpleDurationConstraint)
A single simple duration constraint.
All(Vec<SimpleDurationConstraint>)
§Requirements
Requires Duration Inequalities.
Implementations§
Source§impl DurationConstraint
impl DurationConstraint
Sourcepub const fn new(constraint: SimpleDurationConstraint) -> Self
pub const fn new(constraint: SimpleDurationConstraint) -> Self
Creates a constraint from a single simple duration constraint.
Sourcepub fn all<I: IntoIterator<Item = SimpleDurationConstraint>>(
constraints: I,
) -> Self
pub fn all<I: IntoIterator<Item = SimpleDurationConstraint>>( constraints: I, ) -> Self
Creates a conjunction (and ...) of simple duration constraints.
The iterator should not be empty; this is only checked in debug builds.
Sourcepub fn new_all<I: IntoIterator<Item = SimpleDurationConstraint>>(
constraints: I,
) -> Self
pub fn new_all<I: IntoIterator<Item = SimpleDurationConstraint>>( constraints: I, ) -> Self
Creates a conjunction (and ...) of simple duration constraints. Same as all.
Trait Implementations§
Source§impl Clone for DurationConstraint
impl Clone for DurationConstraint
Source§impl Debug for DurationConstraint
impl Debug for DurationConstraint
Source§impl<'de> Deserialize<'de> for DurationConstraint
Available on crate feature serde only.
impl<'de> Deserialize<'de> for DurationConstraint
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>
Parses like the other types, but (), which means no constraint, is refused.
Source§impl From<SimpleDurationConstraint> for DurationConstraint
impl From<SimpleDurationConstraint> for DurationConstraint
Source§fn from(value: SimpleDurationConstraint) -> Self
fn from(value: SimpleDurationConstraint) -> Self
Converts to this type from the input type.
Source§impl FromIterator<SimpleDurationConstraint> for DurationConstraint
impl FromIterator<SimpleDurationConstraint> for DurationConstraint
Source§fn from_iter<T: IntoIterator<Item = SimpleDurationConstraint>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = SimpleDurationConstraint>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl IntoIterator for DurationConstraint
impl IntoIterator for DurationConstraint
Source§type Item = SimpleDurationConstraint
type Item = SimpleDurationConstraint
The type of the elements being iterated over.
Source§type IntoIter = FlatteningIntoIterator<<DurationConstraint as IntoIterator>::Item>
type IntoIter = FlatteningIntoIterator<<DurationConstraint as IntoIterator>::Item>
Which kind of iterator are we turning this into?
Source§impl Parser for DurationConstraint
Available on crate feature parser only.
impl Parser for DurationConstraint
Available on crate feature
parser only.Source§type Item = Option<DurationConstraint>
type Item = Option<DurationConstraint>
The parsed value;
Self except for
DurationConstraint, which may be empty.Source§impl PartialEq for DurationConstraint
impl PartialEq for DurationConstraint
Source§impl Serialize for DurationConstraint
Available on crate feature serde only.
impl Serialize for DurationConstraint
Available on crate feature
serde only.impl StructuralPartialEq for DurationConstraint
Source§impl Visitor<DurationConstraint, RcDoc<'static>> for PrettyRenderer
Available on crate feature pretty only.
impl Visitor<DurationConstraint, RcDoc<'static>> for PrettyRenderer
Available on crate feature
pretty only.Source§fn visit(&self, value: &DurationConstraint) -> RcDoc<'static>
fn visit(&self, value: &DurationConstraint) -> RcDoc<'static>
Visits
value and returns the result.Auto Trait Implementations§
impl Forget for DurationConstraint
impl Freeze for DurationConstraint
impl Move for DurationConstraint
impl RefUnwindSafe for DurationConstraint
impl Send for DurationConstraint
impl Sync for DurationConstraint
impl Unpin for DurationConstraint
impl UnsafeUnpin for DurationConstraint
impl UnwindSafe for DurationConstraint
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.