pub struct ContextAnnotation {Show 14 fields
pub id: String,
pub scope: Option<AnnotationScope>,
pub content: String,
pub tags: Vec<String>,
pub attribution: String,
pub created_at: Option<Timestamp>,
pub source_hash: Option<Vec<u8>>,
pub created_at_state: Option<StateId>,
pub staleness: i32,
pub status: i32,
pub kind: i32,
pub revision_count: u32,
pub supersedes_annotation_id: Option<String>,
pub supersedes_rewrite_pct: Option<u32>,
}Fields§
§id: String§scope: Option<AnnotationScope>§content: String§attribution: String§created_at: Option<Timestamp>§source_hash: Option<Vec<u8>>§created_at_state: Option<StateId>§staleness: i32§status: i32§kind: i32§revision_count: u32§supersedes_annotation_id: Option<String>§supersedes_rewrite_pct: Option<u32>Implementations§
Source§impl ContextAnnotation
impl ContextAnnotation
Sourcepub fn source_hash(&self) -> &[u8] ⓘ
pub fn source_hash(&self) -> &[u8] ⓘ
Returns the value of source_hash, or the default value if source_hash is unset.
Sourcepub fn staleness(&self) -> StalenessStatus
pub fn staleness(&self) -> StalenessStatus
Returns the enum value of staleness, or the default if the field is set to an invalid enum value.
Sourcepub fn set_staleness(&mut self, value: StalenessStatus)
pub fn set_staleness(&mut self, value: StalenessStatus)
Sets staleness to the provided enum value.
Sourcepub fn status(&self) -> ContextAnnotationStatus
pub fn status(&self) -> ContextAnnotationStatus
Returns the enum value of status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: ContextAnnotationStatus)
pub fn set_status(&mut self, value: ContextAnnotationStatus)
Sets status to the provided enum value.
Sourcepub fn kind(&self) -> ContextAnnotationKind
pub fn kind(&self) -> ContextAnnotationKind
Returns the enum value of kind, or the default if the field is set to an invalid enum value.
Sourcepub fn set_kind(&mut self, value: ContextAnnotationKind)
pub fn set_kind(&mut self, value: ContextAnnotationKind)
Sets kind to the provided enum value.
Sourcepub fn supersedes_annotation_id(&self) -> &str
pub fn supersedes_annotation_id(&self) -> &str
Returns the value of supersedes_annotation_id, or the default value if supersedes_annotation_id is unset.
Sourcepub fn supersedes_rewrite_pct(&self) -> u32
pub fn supersedes_rewrite_pct(&self) -> u32
Returns the value of supersedes_rewrite_pct, or the default value if supersedes_rewrite_pct is unset.
Trait Implementations§
Source§impl Clone for ContextAnnotation
impl Clone for ContextAnnotation
Source§fn clone(&self) -> ContextAnnotation
fn clone(&self) -> ContextAnnotation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContextAnnotation
impl Debug for ContextAnnotation
Source§impl Default for ContextAnnotation
impl Default for ContextAnnotation
impl Eq for ContextAnnotation
Source§impl Hash for ContextAnnotation
impl Hash for ContextAnnotation
Source§impl Message for ContextAnnotation
impl Message for ContextAnnotation
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for ContextAnnotation
impl PartialEq for ContextAnnotation
impl StructuralPartialEq for ContextAnnotation
Auto Trait Implementations§
impl Freeze for ContextAnnotation
impl RefUnwindSafe for ContextAnnotation
impl Send for ContextAnnotation
impl Sync for ContextAnnotation
impl Unpin for ContextAnnotation
impl UnsafeUnpin for ContextAnnotation
impl UnwindSafe for ContextAnnotation
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