pub struct DomainInfo {
pub name: String,
pub cardinality: usize,
pub elements: Option<Vec<String>>,
pub description: Option<String>,
pub metadata: Option<Metadata>,
pub parametric_type: Option<ParametricType>,
}Expand description
Domain information including cardinality and optional element enumeration
Fields§
§name: String§cardinality: usize§elements: Option<Vec<String>>§description: Option<String>§metadata: Option<Metadata>Rich metadata including provenance, documentation, tags
parametric_type: Option<ParametricType>Parametric type definition (e.g., List<T>)
Implementations§
Source§impl DomainInfo
impl DomainInfo
pub fn new(name: impl Into<String>, cardinality: usize) -> DomainInfo
pub fn with_elements( name: impl Into<String>, elements: Vec<String>, ) -> DomainInfo
pub fn with_description(self, desc: impl Into<String>) -> DomainInfo
pub fn with_metadata(self, metadata: Metadata) -> DomainInfo
pub fn with_parametric_type(self, ptype: ParametricType) -> DomainInfo
pub fn has_element(&self, element: &str) -> bool
pub fn get_index(&self, element: &str) -> Option<usize>
Trait Implementations§
Source§impl Clone for DomainInfo
impl Clone for DomainInfo
Source§fn clone(&self) -> DomainInfo
fn clone(&self) -> DomainInfo
Returns a duplicate 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 DomainInfo
impl Debug for DomainInfo
Source§impl<'de> Deserialize<'de> for DomainInfo
impl<'de> Deserialize<'de> for DomainInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DomainInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DomainInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DomainInfo
impl Serialize for DomainInfo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for DomainInfo
impl RefUnwindSafe for DomainInfo
impl Send for DomainInfo
impl Sync for DomainInfo
impl Unpin for DomainInfo
impl UnwindSafe for DomainInfo
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