Struct MetadataSchema

Source
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

Source

pub fn new() -> MetadataSchema

Creates a new, empty MetadataSchema.

Source

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 a String.
Source

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 a String.
Source

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.
Source

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 a String representing the version.
Source

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 a String explaining the deprecation.
Source

pub fn merge(self, other: &MetadataSchema) -> MetadataSchema

Merges another MetadataSchema into this one.

Fields in the other schema take precedence if they are Some.

§Arguments
  • other - A reference to another MetadataSchema to merge.
§Returns

A new MetadataSchema with merged fields.

Trait Implementations§

Source§

impl BitOr for MetadataSchema

Source§

type Output = MetadataSchema

The resulting type after applying the | operator.
Source§

fn bitor(self, other: MetadataSchema) -> <MetadataSchema as BitOr>::Output

Performs the | operation. Read more
Source§

impl Clone for MetadataSchema

Source§

fn clone(&self) -> MetadataSchema

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MetadataSchema

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MetadataSchema

Source§

fn default() -> MetadataSchema

Returns the “default value” for a type. Read more
Source§

impl PartialEq for MetadataSchema

Source§

fn eq(&self, other: &MetadataSchema) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serializable for MetadataSchema

Source§

fn serialize(&self) -> Option<String>

Serializes the object into an optional string representation. Read more
Source§

fn set_metadata(&mut self, metadata: MetadataSchema)

Sets metadata for the object. Read more
Source§

fn set_nullable(&mut self, nullable: bool)

Sets the nullability of the object. Read more
Source§

fn set_rename(&mut self, new_name: &str)

Renames the object. Read more
Source§

impl Eq for MetadataSchema

Source§

impl StructuralPartialEq for MetadataSchema

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.