pub struct Scrap {
pub id: i64,
pub task_id: i64,
pub scrap_id: i64,
pub content: String,
pub created_at: DateTime<Utc>,
pub active_todo_id: Option<i64>,
}Expand description
Represents a scrap (work note) for a task.
Scraps are chronological notes that capture progress, decisions, and findings during task execution. They help maintain context and flow of work.
Fields§
§id: i64§task_id: i64§scrap_id: i64Task-scoped sequential ID for this scrap
content: String§created_at: DateTime<Utc>§active_todo_id: Option<i64>The task_index of the active (oldest pending) todo when this scrap was created
Implementations§
Source§impl Scrap
impl Scrap
Sourcepub fn content_html(&self) -> String
pub fn content_html(&self) -> String
Converts the scrap content from markdown to HTML.
This method uses pulldown-cmark to parse the markdown content and render it as HTML. Plain URLs are automatically converted to clickable links. All links open in new tabs with target=“_blank”. The output is safe for display in web pages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scrap
impl RefUnwindSafe for Scrap
impl Send for Scrap
impl Sync for Scrap
impl Unpin for Scrap
impl UnsafeUnpin for Scrap
impl UnwindSafe for Scrap
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