Keep context implementations with their document models
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use super::contextualize::Contextualize;
|
||||
use super::id::{IdError, validate_id};
|
||||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
|
||||
@@ -22,3 +23,9 @@ pub struct User {
|
||||
pub id: UserId,
|
||||
pub display_name: String,
|
||||
}
|
||||
|
||||
impl Contextualize for User {
|
||||
fn render_context(&self) -> String {
|
||||
format!("User: {}", self.display_name)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user