pub struct ValuesSchema {
pub values: Box<dyn Serializable>,
pub metadata: Option<MetadataSchema>,
pub is_nullable: Option<bool>,
}Expand description
Represents a schema for values in an Arri schema.
This struct defines the values, optional metadata, and nullability associated with the schema.
Fields§
§values: Box<dyn Serializable>The values associated with the schema, represented as a serializable object.
metadata: Option<MetadataSchema>Optional metadata associated with the schema.
is_nullable: Option<bool>Indicates whether the schema allows null values. If Some(true),
null values are permitted.
Implementations§
Source§impl ValuesSchema
impl ValuesSchema
Sourcepub fn new(values: Box<dyn Serializable>) -> ValuesSchema
pub fn new(values: Box<dyn Serializable>) -> ValuesSchema
Trait Implementations§
Source§impl Debug for ValuesSchema
impl Debug for ValuesSchema
Source§impl Serializable for ValuesSchema
impl Serializable for ValuesSchema
Source§fn serialize(&self) -> Option<String>
fn serialize(&self) -> Option<String>
Serializes the ValuesSchema into a string representation.
§Returns
An Option<String> containing the serialized schema, or None if serialization fails.
Source§fn set_metadata(&mut self, metadata: MetadataSchema)
fn set_metadata(&mut self, metadata: MetadataSchema)
Sets the metadata for the schema.
§Arguments
metadata- AMetadataSchemaobject to associate with the schema.
Source§fn set_nullable(&mut self, nullable: bool)
fn set_nullable(&mut self, nullable: bool)
Sets the nullability flag for the schema.
§Arguments
nullable- A boolean indicating whether null values are allowed.
Source§fn set_rename(&mut self, new_name: &str)
fn set_rename(&mut self, new_name: &str)
Renames the object. Read more
Auto Trait Implementations§
impl Freeze for ValuesSchema
impl !RefUnwindSafe for ValuesSchema
impl !Send for ValuesSchema
impl !Sync for ValuesSchema
impl Unpin for ValuesSchema
impl !UnwindSafe for ValuesSchema
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.