pub struct PddlFile {
pub domains: Vec<Domain>,
pub problems: Vec<Problem>,
}Expand description
A PDDL file containing zero or more domains and problems.
PDDL files can contain multiple (define (domain ...)) and (define (problem ...))
blocks in any order. This struct collects them all.
Fields§
§domains: Vec<Domain>All domains found in the file.
problems: Vec<Problem>All problems found in the file.
Implementations§
Source§impl PddlFile
impl PddlFile
Sourcepub fn with_domains_and_problems(
domains: Vec<Domain>,
problems: Vec<Problem>,
) -> Self
pub fn with_domains_and_problems( domains: Vec<Domain>, problems: Vec<Problem>, ) -> Self
Creates a PddlFile with the given domains and problems.
Sourcepub fn with_domain(self, domain: Domain) -> Self
pub fn with_domain(self, domain: Domain) -> Self
Adds a domain to this file.
Sourcepub fn with_problem(self, problem: Problem) -> Self
pub fn with_problem(self, problem: Problem) -> Self
Adds a problem to this file.
Sourcepub fn domain_count(&self) -> usize
pub fn domain_count(&self) -> usize
Returns the number of domains in this file.
Sourcepub fn problem_count(&self) -> usize
pub fn problem_count(&self) -> usize
Returns the number of problems in this file.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PddlFile
Available on crate feature serde only.
impl<'de> Deserialize<'de> for PddlFile
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
Auto Trait Implementations§
impl Forget for PddlFile
impl Freeze for PddlFile
impl Move for PddlFile
impl RefUnwindSafe for PddlFile
impl Send for PddlFile
impl Sync for PddlFile
impl Unpin for PddlFile
impl UnsafeUnpin for PddlFile
impl UnwindSafe for PddlFile
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