Enum cloudevents::event::Attributes
source · pub enum Attributes {
V03(AttributesV03),
V10(AttributesV10),
}
Expand description
Union type representing one of the possible context attributes structs
Variants§
V03(AttributesV03)
V10(AttributesV10)
Trait Implementations§
source§impl AttributesReader for Attributes
impl AttributesReader for Attributes
source§fn source(&self) -> &UriReference
fn source(&self) -> &UriReference
Get the source.
source§fn specversion(&self) -> SpecVersion
fn specversion(&self) -> SpecVersion
Get the specversion.
source§fn datacontenttype(&self) -> Option<&str>
fn datacontenttype(&self) -> Option<&str>
Get the datacontenttype.
source§fn dataschema(&self) -> Option<&Url>
fn dataschema(&self) -> Option<&Url>
Get the dataschema.
source§impl AttributesWriter for Attributes
impl AttributesWriter for Attributes
source§fn set_source(&mut self, source: impl Into<UriReference>) -> UriReference
fn set_source(&mut self, source: impl Into<UriReference>) -> UriReference
Set the source.
Returns the previous value.
source§fn set_type(&mut self, ty: impl Into<String>) -> String
fn set_type(&mut self, ty: impl Into<String>) -> String
Set the type.
Returns the previous value.
source§fn set_subject(&mut self, subject: Option<impl Into<String>>) -> Option<String>
fn set_subject(&mut self, subject: Option<impl Into<String>>) -> Option<String>
Set the subject.
Returns the previous value.
source§fn set_time(
&mut self,
time: Option<impl Into<DateTime<Utc>>>
) -> Option<DateTime<Utc>>
fn set_time( &mut self, time: Option<impl Into<DateTime<Utc>>> ) -> Option<DateTime<Utc>>
Set the time.
Returns the previous value.
source§fn set_datacontenttype(
&mut self,
datacontenttype: Option<impl Into<String>>
) -> Option<String>
fn set_datacontenttype( &mut self, datacontenttype: Option<impl Into<String>> ) -> Option<String>
Set the datacontenttype.
Returns the previous value.
source§fn set_dataschema(&mut self, dataschema: Option<impl Into<Url>>) -> Option<Url>
fn set_dataschema(&mut self, dataschema: Option<impl Into<Url>>) -> Option<Url>
Set the dataschema.
Returns the previous value.
source§impl Clone for Attributes
impl Clone for Attributes
source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a copy 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 Attributes
impl Debug for Attributes
source§impl PartialEq<Attributes> for Attributes
impl PartialEq<Attributes> for Attributes
source§fn eq(&self, other: &Attributes) -> bool
fn eq(&self, other: &Attributes) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Attributes
impl StructuralEq for Attributes
impl StructuralPartialEq for Attributes
Auto Trait Implementations§
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.