Trait cloudevents::event::AttributesWriter
source · pub trait AttributesWriter {
// Required methods
fn set_id(&mut self, id: impl Into<String>) -> String;
fn set_source(&mut self, source: impl Into<UriReference>) -> UriReference;
fn set_type(&mut self, ty: impl Into<String>) -> String;
fn set_subject(
&mut self,
subject: Option<impl Into<String>>,
) -> Option<String>;
fn set_time(
&mut self,
time: Option<impl Into<DateTime<Utc>>>,
) -> Option<DateTime<Utc>>;
fn set_datacontenttype(
&mut self,
datacontenttype: Option<impl Into<String>>,
) -> Option<String>;
fn set_dataschema(
&mut self,
dataschema: Option<impl Into<Url>>,
) -> Option<Url>;
}
Expand description
Trait to set CloudEvents Context attributes.
Required Methods§
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
Object Safety§
This trait is not object safe.