]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/traits.rs
Get rid of Safe Views, use serde_skip (#2767)
[lemmy.git] / crates / db_schema / src / traits.rs
index 2055ab644b1fd1eab4c62cd9dfebae5a3c9a8d44..d4e0154714aba0920b5cc616ca5537ad0777722d 100644 (file)
@@ -140,24 +140,9 @@ pub trait Reportable {
     Self: Sized;
 }
 
-// TODO these should be removed, there should be another way to do this
-pub trait DeleteableOrRemoveable {
-  fn blank_out_deleted_or_removed_info(self) -> Self;
-}
-
-pub trait ToSafe {
-  type SafeColumns;
-  fn safe_columns_tuple() -> Self::SafeColumns;
-}
-
-pub trait ToSafeSettings {
-  type SafeSettingsColumns;
-  fn safe_settings_columns_tuple() -> Self::SafeSettingsColumns;
-}
-
-pub trait ViewToVec {
-  type DbTuple;
-  fn from_tuple_to_vec(tuple: Vec<Self::DbTuple>) -> Vec<Self>
+pub trait JoinView {
+  type JoinTuple;
+  fn from_tuple(tuple: Self::JoinTuple) -> Self
   where
     Self: Sized;
 }