pub struct ContextItem { /* private fields */ }Expand description
One structured item inside an external context bundle.
Implementations§
Source§impl ContextItem
impl ContextItem
pub fn new( item_id: impl Into<String>, kind: impl Into<String>, title: impl Into<String>, narrative: Option<String>, attributes: Attributes, reference_ids: Vec<String>, ) -> Result<Self, DomainError>
pub fn item_id(&self) -> &str
pub fn kind(&self) -> &str
pub fn title(&self) -> &str
pub fn narrative(&self) -> Option<&str>
pub fn attributes(&self) -> &Attributes
pub fn reference_ids(&self) -> &[String]
Trait Implementations§
Source§impl Clone for ContextItem
impl Clone for ContextItem
Source§fn clone(&self) -> ContextItem
fn clone(&self) -> ContextItem
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 ContextItem
impl Debug for ContextItem
Source§impl<'de> Deserialize<'de> for ContextItem
impl<'de> Deserialize<'de> for ContextItem
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 ContextItem
Source§impl PartialEq for ContextItem
impl PartialEq for ContextItem
Source§impl Serialize for ContextItem
impl Serialize for ContextItem
impl StructuralPartialEq for ContextItem
Auto Trait Implementations§
impl Freeze for ContextItem
impl RefUnwindSafe for ContextItem
impl Send for ContextItem
impl Sync for ContextItem
impl Unpin for ContextItem
impl UnsafeUnpin for ContextItem
impl UnwindSafe for ContextItem
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