pub struct EditHistory {
pub id: EditHistoryId,
pub file_id: Option<FileId>,
pub link_id: Option<LinkId>,
pub folder_id: Option<FolderId>,
pub user: Option<User>,
pub ty: EditHistoryType,
pub metadata: Json<EditHistoryMetadata>,
pub created_at: DateTime<Utc>,
}Fields§
§id: EditHistoryIdUnique identifier for this history entry
file_id: Option<FileId>ID of the file that was edited (If a file was edited)
link_id: Option<LinkId>ID of the file that was edited (If a link was edited)
folder_id: Option<FolderId>ID of the file that was edited (If a folder was edited)
user: Option<User>User that made the edit
ty: EditHistoryTypeThe type of change that was made
metadata: Json<EditHistoryMetadata>Metadata associated with the change
created_at: DateTime<Utc>When this change was made
Implementations§
Source§impl EditHistory
impl EditHistory
pub async fn create( db: impl DbExecutor<'_>, __arg1: CreateEditHistory, ) -> DbResult<()>
pub async fn all_by_file( db: impl DbExecutor<'_>, file_id: FileId, ) -> DbResult<Vec<EditHistory>>
pub async fn all_by_folder( db: impl DbExecutor<'_>, folder_id: FolderId, ) -> DbResult<Vec<EditHistory>>
pub async fn all_by_link( db: impl DbExecutor<'_>, link_id: LinkId, ) -> DbResult<Vec<EditHistory>>
Trait Implementations§
Source§impl ComposeSchema for EditHistory
impl ComposeSchema for EditHistory
Source§impl Debug for EditHistory
impl Debug for EditHistory
Source§impl<'a, R: Row> FromRow<'a, R> for EditHistorywhere
&'a str: ColumnIndex<R>,
EditHistoryId: Decode<'a, R::Database> + Type<R::Database>,
Option<FileId>: Decode<'a, R::Database> + Type<R::Database>,
Option<LinkId>: Decode<'a, R::Database> + Type<R::Database>,
Option<FolderId>: Decode<'a, R::Database> + Type<R::Database>,
Option<User>: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Json<EditHistoryMetadata>: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for EditHistorywhere
&'a str: ColumnIndex<R>,
EditHistoryId: Decode<'a, R::Database> + Type<R::Database>,
Option<FileId>: Decode<'a, R::Database> + Type<R::Database>,
Option<LinkId>: Decode<'a, R::Database> + Type<R::Database>,
Option<FolderId>: Decode<'a, R::Database> + Type<R::Database>,
Option<User>: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Json<EditHistoryMetadata>: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
Source§impl Serialize for EditHistory
impl Serialize for EditHistory
Auto Trait Implementations§
impl Freeze for EditHistory
impl RefUnwindSafe for EditHistory
impl Send for EditHistory
impl Sync for EditHistory
impl Unpin for EditHistory
impl UnsafeUnpin for EditHistory
impl UnwindSafe for EditHistory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.