Trait stitch::Message [] [src]

pub trait Message {
    fn get_table_name(&self) -> String;
fn get_keys(&self) -> Vec<String>; }

Trait that defines fields needed to send a record to stitch.

Example

struct User {
    id: u64,
    email: String,
    first_name: String,
    last_name: String,
}

impl Message for User {
    fn get_table_name(&self) -> String {
        String::from("users")
    }

    fn get_keys(&self) -> Vec<String> {
        vec![String::from("id")]
    }
}

Required Methods

Table name of this record. Determines destination schema.

Primary keys of this record.

Implementors