Move guard and reference code out of entities folder.

This commit is contained in:
Paul Makles
2021-01-09 13:59:45 +00:00
parent 80e3baaa15
commit bb3667a83b
3 changed files with 43 additions and 43 deletions

View File

@@ -42,6 +42,14 @@ impl Ref {
}
}
impl User {
pub fn as_ref(&self) -> Ref {
Ref {
id: self.id.to_string(),
}
}
}
impl<'r> FromParam<'r> for Ref {
type Error = &'r RawStr;