pub struct ContextBlob {
pub format_version: u8,
pub annotations: Vec<Annotation>,
}Expand description
A collection of logical annotations for a single target.
Fields§
§format_version: u8§annotations: Vec<Annotation>Implementations§
Source§impl ContextBlob
impl ContextBlob
pub const FORMAT_VERSION: u8 = 2
pub fn new(annotations: Vec<Annotation>) -> Self
pub fn encode(&self) -> Result<Vec<u8>, ContextError>
pub fn decode(bytes: &[u8]) -> Result<Self, ContextError>
pub fn validate(&self) -> Result<(), ContextError>
Trait Implementations§
Source§impl Clone for ContextBlob
impl Clone for ContextBlob
Source§fn clone(&self) -> ContextBlob
fn clone(&self) -> ContextBlob
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 ContextBlob
impl Debug for ContextBlob
Source§impl<'de> Deserialize<'de> for ContextBlob
impl<'de> Deserialize<'de> for ContextBlob
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
impl Eq for ContextBlob
Source§impl PartialEq for ContextBlob
impl PartialEq for ContextBlob
Source§fn eq(&self, other: &ContextBlob) -> bool
fn eq(&self, other: &ContextBlob) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContextBlob
impl Serialize for ContextBlob
impl StructuralPartialEq for ContextBlob
Auto Trait Implementations§
impl Freeze for ContextBlob
impl RefUnwindSafe for ContextBlob
impl Send for ContextBlob
impl Sync for ContextBlob
impl Unpin for ContextBlob
impl UnsafeUnpin for ContextBlob
impl UnwindSafe for ContextBlob
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