pub struct CDEvent { /* private fields */ }
Implementations§
Source§impl CDEvent
impl CDEvent
pub fn with_version<T>(self, v: T) -> Self
pub fn with_id(self, v: Id) -> Self
Sourcepub fn source(&self) -> &UriReference
pub fn source(&self) -> &UriReference
pub fn with_source(self, v: UriReference) -> Self
Sourcepub fn timestamp(&self) -> &OffsetDateTime
pub fn timestamp(&self) -> &OffsetDateTime
pub fn with_timestamp(self, v: OffsetDateTime) -> Self
Sourcepub fn ty(&self) -> &str
pub fn ty(&self) -> &str
see https://github.com/cdevents/spec/blob/main/spec.md#type-context derived from subject.content
Sourcepub fn custom_data(&self) -> &Option<Value>
pub fn custom_data(&self) -> &Option<Value>
pub fn with_custom_data(self, custom_data: Value) -> Self
Sourcepub fn custom_data_content_type(&self) -> &Option<String>
pub fn custom_data_content_type(&self) -> &Option<String>
pub fn with_custom_data_content_type( self, custom_data_content_type: String, ) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CDEvent
impl<'de> Deserialize<'de> for CDEvent
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 CDEvent
impl StructuralPartialEq for CDEvent
Auto Trait Implementations§
impl Freeze for CDEvent
impl RefUnwindSafe for CDEvent
impl Send for CDEvent
impl Sync for CDEvent
impl Unpin for CDEvent
impl UnwindSafe for CDEvent
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