pub struct DynamicFieldDefinitions { /* private fields */ }Expand description
Immutable owner-specific definitions, shared by all compatible row views.
Implementations§
Source§impl DynamicFieldDefinitions
impl DynamicFieldDefinitions
pub fn new( owner_type: impl Into<String>, revision: impl Into<String>, fields: impl IntoIterator<Item = (String, DataType)>, ) -> Result<Arc<Self>, DynamicFieldError>
pub fn owner_type(&self) -> &str
pub fn revision(&self) -> &str
pub fn fields(&self) -> &HashMap<String, DataType>
pub fn data_type(&self, code: &str) -> Result<DataType, DynamicFieldError>
Sourcepub fn validate_value(
&self,
code: &str,
value: &Value,
) -> Result<(), DynamicFieldError>
pub fn validate_value( &self, code: &str, value: &Value, ) -> Result<(), DynamicFieldError>
Validate a borrowed operand without cloning its strings/JSON or building an intermediate row map. Providers use the same type contract as carriers.
Trait Implementations§
Source§impl Debug for DynamicFieldDefinitions
impl Debug for DynamicFieldDefinitions
impl Eq for DynamicFieldDefinitions
Source§impl PartialEq for DynamicFieldDefinitions
impl PartialEq for DynamicFieldDefinitions
impl StructuralPartialEq for DynamicFieldDefinitions
Auto Trait Implementations§
impl Freeze for DynamicFieldDefinitions
impl RefUnwindSafe for DynamicFieldDefinitions
impl Send for DynamicFieldDefinitions
impl Sync for DynamicFieldDefinitions
impl Unpin for DynamicFieldDefinitions
impl UnsafeUnpin for DynamicFieldDefinitions
impl UnwindSafe for DynamicFieldDefinitions
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