pub struct MetadataSchema {
pub id: Option<String>,
pub description: Option<String>,
pub is_deprecated: Option<bool>,
pub deprecated_since: Option<String>,
pub deprecated_message: Option<String>,
}Expand description
Represents metadata schema for Arri.
This struct defines the metadata schema, including optional fields
such as id, description, and deprecation-related information.
Fields§
§id: Option<String>Unique identifier for the metadata schema.
description: Option<String>Description of the metadata schema.
is_deprecated: Option<bool>Indicates whether the schema is deprecated.
deprecated_since: Option<String>Version since which the schema is deprecated.
deprecated_message: Option<String>Message explaining the deprecation.
Implementations§
Source§impl MetadataSchema
impl MetadataSchema
Sourcepub fn new() -> MetadataSchema
pub fn new() -> MetadataSchema
Creates a new, empty MetadataSchema.
Sourcepub fn set_id(&mut self, id: impl ToString) -> &mut MetadataSchema
pub fn set_id(&mut self, id: impl ToString) -> &mut MetadataSchema
Sets the id field of the metadata schema.
§Arguments
id- A value that can be converted to aString.
Sourcepub fn set_description(
&mut self,
description: impl ToString,
) -> &mut MetadataSchema
pub fn set_description( &mut self, description: impl ToString, ) -> &mut MetadataSchema
Sets the description field of the metadata schema.
§Arguments
description- A value that can be converted to aString.
Sourcepub fn set_deprecated(&mut self, flag: bool) -> &mut MetadataSchema
pub fn set_deprecated(&mut self, flag: bool) -> &mut MetadataSchema
Sets the is_deprecated field of the metadata schema.
§Arguments
flag- A boolean indicating whether the schema is deprecated.
Sourcepub fn set_deprecated_since(
&mut self,
version: impl ToString,
) -> &mut MetadataSchema
pub fn set_deprecated_since( &mut self, version: impl ToString, ) -> &mut MetadataSchema
Sets the deprecated_since field of the metadata schema.
§Arguments
version- A value that can be converted to aStringrepresenting the version.
Sourcepub fn set_deprecated_message(
&mut self,
message: impl ToString,
) -> &mut MetadataSchema
pub fn set_deprecated_message( &mut self, message: impl ToString, ) -> &mut MetadataSchema
Sets the deprecated_message field of the metadata schema.
§Arguments
message- A value that can be converted to aStringexplaining the deprecation.
Sourcepub fn merge(self, other: &MetadataSchema) -> MetadataSchema
pub fn merge(self, other: &MetadataSchema) -> MetadataSchema
Trait Implementations§
Source§impl BitOr for MetadataSchema
impl BitOr for MetadataSchema
Source§type Output = MetadataSchema
type Output = MetadataSchema
The resulting type after applying the
| operator.Source§fn bitor(self, other: MetadataSchema) -> <MetadataSchema as BitOr>::Output
fn bitor(self, other: MetadataSchema) -> <MetadataSchema as BitOr>::Output
Performs the
| operation. Read moreSource§impl Clone for MetadataSchema
impl Clone for MetadataSchema
Source§fn clone(&self) -> MetadataSchema
fn clone(&self) -> MetadataSchema
Returns a copy 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 MetadataSchema
impl Debug for MetadataSchema
Source§impl Default for MetadataSchema
impl Default for MetadataSchema
Source§fn default() -> MetadataSchema
fn default() -> MetadataSchema
Returns the “default value” for a type. Read more
Source§impl PartialEq for MetadataSchema
impl PartialEq for MetadataSchema
Source§impl Serializable for MetadataSchema
impl Serializable for MetadataSchema
Source§fn serialize(&self) -> Option<String>
fn serialize(&self) -> Option<String>
Serializes the object into an optional string representation. Read more
Source§fn set_metadata(&mut self, metadata: MetadataSchema)
fn set_metadata(&mut self, metadata: MetadataSchema)
Sets metadata for the object. Read more
Source§fn set_nullable(&mut self, nullable: bool)
fn set_nullable(&mut self, nullable: bool)
Sets the nullability of the object. Read more
Source§fn set_rename(&mut self, new_name: &str)
fn set_rename(&mut self, new_name: &str)
Renames the object. Read more
impl Eq for MetadataSchema
impl StructuralPartialEq for MetadataSchema
Auto Trait Implementations§
impl Freeze for MetadataSchema
impl RefUnwindSafe for MetadataSchema
impl Send for MetadataSchema
impl Sync for MetadataSchema
impl Unpin for MetadataSchema
impl UnwindSafe for MetadataSchema
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.