Plume/src/activity_pub/object.rs
2018-05-03 16:22:40 +01:00

14 lines
306 B
Rust

use diesel::PgConnection;
use serde_json;
use activity_pub::actor::Actor;
pub trait Object {
fn serialize(&self, conn: &PgConnection) -> serde_json::Value;
fn compute_id(&self, conn: &PgConnection) -> String;
}
pub trait Attribuable {
fn set_attribution<T>(&self, by: &T) where T: Actor;
}