pub struct Annotation {
pub owner: UserRef,
pub target: EntityRef,
pub loved: bool,
pub rating: Option<u8>,
pub note: Option<String>,
pub tags: BTreeSet<String>,
pub created_at: u64,
pub updated_at: u64,
}Expand description
Everything one person said about one entity.
One record per target rather than one per fact: a favourite, a rating, a note and a set of tags are four ways of having an opinion, not four features, and keeping them together is what makes copying what was said about an album onto another album a single operation.
Fields§
§owner: UserRefWhose opinion it is.
target: EntityRefWhat it is about.
loved: boolA favourite.
rating: Option<u8>One to five stars, or nothing said.
note: Option<String>Free text, as long as the user cares to make it.
Free labels: “to rip again”, “vinyl”, “for the car”.
created_at: u64When it was first written (Unix epoch, seconds).
updated_at: u64When it was last touched.
Implementations§
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Annotation
impl Debug for Annotation
Source§impl Default for Annotation
impl Default for Annotation
Source§fn default() -> Annotation
fn default() -> Annotation
Returns the “default value” for a type. Read more
Source§impl PartialEq for Annotation
impl PartialEq for Annotation
impl StructuralPartialEq for Annotation
Auto Trait Implementations§
impl Freeze for Annotation
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnwindSafe for Annotation
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