pub struct TypeAttribute {
pub description: Option<String>,
pub deprecated: bool,
pub rename: Option<String>,
pub rename_all: Option<RenameRule>,
pub examples: Vec<Value>,
pub format_metadata: IndexMap<String, IndexMap<String, Value>>,
}Fields§
§description: Option<String>§deprecated: bool§rename: Option<String>§rename_all: Option<RenameRule>§examples: Vec<Value>§format_metadata: IndexMap<String, IndexMap<String, Value>>Implementations§
Source§impl TypeAttribute
impl TypeAttribute
pub fn new() -> TypeAttribute
pub fn with_description(self, description: impl Into<String>) -> TypeAttribute
pub fn deprecated(self) -> TypeAttribute
pub fn with_rename(self, name: impl Into<String>) -> TypeAttribute
pub fn with_rename_all(self, rule: RenameRule) -> TypeAttribute
pub fn with_example(self, example: Value) -> TypeAttribute
Trait Implementations§
Source§impl Clone for TypeAttribute
impl Clone for TypeAttribute
Source§fn clone(&self) -> TypeAttribute
fn clone(&self) -> TypeAttribute
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 TypeAttribute
impl Debug for TypeAttribute
Source§impl Default for TypeAttribute
impl Default for TypeAttribute
Source§fn default() -> TypeAttribute
fn default() -> TypeAttribute
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TypeAttribute
impl<'de> Deserialize<'de> for TypeAttribute
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TypeAttribute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TypeAttribute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TypeAttribute
impl PartialEq for TypeAttribute
Source§impl Serialize for TypeAttribute
impl Serialize for TypeAttribute
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
impl StructuralPartialEq for TypeAttribute
Auto Trait Implementations§
impl Freeze for TypeAttribute
impl RefUnwindSafe for TypeAttribute
impl Send for TypeAttribute
impl Sync for TypeAttribute
impl Unpin for TypeAttribute
impl UnwindSafe for TypeAttribute
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