Struct gdl_parser::Relation [-] [+] [src]

pub struct Relation {
    pub name: Constant,
    pub args: Vec<Term>,
}

A GDL relation

Fields

name
args

Methods

impl Relation

fn new<T: Into<Constant>>(name: T, args: Vec<Term>) -> Relation

Consruct a new Relation given a name and a list of args

Trait Implementations

impl Into<Literal> for Relation

fn into(self) -> Literal

impl Into<Sentence> for Relation

fn into(self) -> Sentence

impl ToString for Relation

fn to_string(&self) -> String

Derived Implementations

impl Encodable for Relation

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S>

impl Decodable for Relation

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Relation, __D>

impl PartialEq for Relation

fn eq(&self, __arg_0: &Relation) -> bool

fn ne(&self, __arg_0: &Relation) -> bool

impl Eq for Relation

fn assert_receiver_is_total_eq(&self)

impl Hash for Relation

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Clone for Relation

fn clone(&self) -> Relation

fn clone_from(&mut self, source: &Self)

impl Debug for Relation

fn fmt(&self, __arg_0: &mut Formatter) -> Result