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>) -> ContextBlob
pub fn encode(&self) -> Result<Vec<u8>, ContextError>
pub fn decode(bytes: &[u8]) -> Result<ContextBlob, 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<ContextBlob, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextBlob, <__D as Deserializer<'de>>::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§impl Serialize for ContextBlob
impl Serialize for ContextBlob
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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