pub struct Bo4eMeta {
pub typ: Option<String>,
pub version: Option<String>,
pub id: Option<String>,
pub zusatz_attribute: Vec<AdditionalAttribute>,
}Expand description
Metadata common to all BO4E objects.
This struct holds the standard BO4E metadata fields:
_typ: Type discriminator_version: BO4E schema version_id: External system IDzusatzAttribute: Additional attributes for extensibility
§Example
use bo4e_core::Bo4eMeta;
let meta = Bo4eMeta {
typ: Some("Zaehler".to_string()),
version: Some("202401.0.1".to_string()),
..Default::default()
};Fields§
§typ: Option<String>Type discriminator (maps to _typ in JSON)
version: Option<String>BO4E schema version (maps to _version in JSON)
id: Option<String>External system ID (maps to _id in JSON)
zusatz_attribute: Vec<AdditionalAttribute>Additional attributes for extensibility
Implementations§
Source§impl Bo4eMeta
impl Bo4eMeta
Sourcepub fn with_attribute(self, attr: AdditionalAttribute) -> Self
pub fn with_attribute(self, attr: AdditionalAttribute) -> Self
Add an additional attribute.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Bo4eMeta
impl<'de> Deserialize<'de> for Bo4eMeta
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 StructuralPartialEq for Bo4eMeta
Auto Trait Implementations§
impl Freeze for Bo4eMeta
impl RefUnwindSafe for Bo4eMeta
impl Send for Bo4eMeta
impl Sync for Bo4eMeta
impl Unpin for Bo4eMeta
impl UnwindSafe for Bo4eMeta
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