Struct holmes::engine::types::Predicate [] [src]

pub struct Predicate {
    pub name: String,
    pub description: Option<String>,
    pub fields: Vec<Field>,
}

A Predicate is a name combined with a list of typed slots, e.g.

foo(uint64, string)

would be represented as

use holmes::pg::dyn::types;
use holmes::engine::types::{Predicate, Field};
use std::sync::Arc;
Predicate {
    name: "foo".to_string(),
    description: None,
    fields: vec![Field {
        name: None,
        description: None,
        type_: Arc::new(types::UInt64)
    }, Field {
        name: None,
        description: None,
        type_: Arc::new(types::String)
    }]
};

Fields

Predicate Name

Description of what it means for this predicate to be true. Purely documentation, not mechanical

Predicate fields

Trait Implementations

impl PartialEq for Predicate
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Predicate
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Predicate
[src]

Formats the value using the given formatter.

impl Hash for Predicate
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Eq for Predicate
[src]