pub struct Subject { /* private fields */ }
Expand description
Implementations§
Source§impl Subject
impl Subject
pub fn with_id(self, id: Id) -> Self
Sourcepub fn source(&self) -> &Option<UriReference>
pub fn source(&self) -> &Option<UriReference>
pub fn with_source(self, source: UriReference) -> 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 content
pub fn from_json(ty: &str, json: Value) -> Result<Self, Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Subject
impl<'de> Deserialize<'de> for Subject
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 Subject
impl StructuralPartialEq for Subject
Auto Trait Implementations§
impl Freeze for Subject
impl RefUnwindSafe for Subject
impl Send for Subject
impl Sync for Subject
impl Unpin for Subject
impl UnwindSafe for Subject
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