Struct exar::Event [] [src]

pub struct Event {
    pub id: u64,
    pub data: String,
    pub tags: Vec<String>,
    pub timestamp: u64,
}

Exar DB's event.

Examples

extern crate exar;

use exar::*;

let event = Event::new("data", vec!["tag1", "tag2"]);

Fields

The event id (or sequence number).

The event data/payload.

The event tags.

The event timestamp.

Methods

impl Event
[src]

Returns a new Event with the given data and tags.

Returns a modified version of the event by setting its id to the given value.

Returns a modified version of the event by setting its timestamp to the given value.

Returns a modified version of the event by setting its timestamp to the current time.

Trait Implementations

impl Clone for Event
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Event
[src]

Formats the value using the given formatter.

impl PartialEq for Event
[src]

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

This method tests for !=.

impl Eq for Event
[src]

impl Display for Event
[src]

Formats the value using the given formatter. Read more

impl ToTabSeparatedString for Event
[src]

Returns a tab-separated string from the value.

impl FromTabSeparatedStr for Event
[src]

Returns an instance of Self from a tab-separated string slice or a ParseError if a failure occurs while parsing the string. Read more

impl Validation for Event
[src]

Validates the type or returns a ValidationError if validation fails.

Validates and returns Self or a ValidationError if validation fails.