pub struct Annotation {Show 16 fields
pub id: String,
pub created: OffsetDateTime,
pub updated: OffsetDateTime,
pub user: UserAccountID,
pub uri: String,
pub text: String,
pub tags: Vec<String>,
pub group: String,
pub permissions: Permissions,
pub target: Vec<Target>,
pub links: HashMap<String, String>,
pub hidden: bool,
pub flagged: bool,
pub document: Option<Document>,
pub references: Vec<String>,
pub user_info: Option<UserInfo>,
}Expand description
Full representation of an Annotation resource and applicable relationships.
Fields§
§id: StringAnnotation ID
created: OffsetDateTimeDate of creation
updated: OffsetDateTimeDate of last update
user: UserAccountIDUser account ID in the format “acct:
uri: StringURL of document this annotation is attached to
text: StringThe text content of the annotation body (NOT the selected text in the document)
Tags attached to annotation
group: StringThe unique identifier for the annotation’s group
permissions: Permissions§target: Vec<Target>Which part of the document does the annotation target.
links: HashMap<String, String>An object containing hypermedia links for this annotation
Whether this annotation is hidden from public view
flagged: boolWhether this annotation has one or more flags for moderation
document: Option<Document>Document information
references: Vec<String>Annotation IDs for any annotations this annotation references (e.g. is a reply to)
user_info: Option<UserInfo>Implementations§
Source§impl Annotation
impl Annotation
pub fn update(&mut self, annotation: InputAnnotation)
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<'de> Deserialize<'de> for Annotation
impl<'de> Deserialize<'de> for Annotation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Annotation
impl PartialEq for Annotation
Source§impl Serialize for Annotation
impl Serialize 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