pub struct PropertySchema {
pub property_type: PropertyType,
pub description: Option<String>,
pub default: Option<PluginValue>,
}Expand description
Schema for a property.
Fields§
§property_type: PropertyTypeProperty type.
description: Option<String>Description.
default: Option<PluginValue>Default value.
Implementations§
Source§impl PropertySchema
impl PropertySchema
Sourcepub fn string() -> PropertySchema
pub fn string() -> PropertySchema
Creates a string property schema.
Sourcepub fn boolean() -> PropertySchema
pub fn boolean() -> PropertySchema
Creates a boolean property schema.
Sourcepub fn integer() -> PropertySchema
pub fn integer() -> PropertySchema
Creates an integer property schema.
Sourcepub fn with_description(self, description: impl Into<String>) -> PropertySchema
pub fn with_description(self, description: impl Into<String>) -> PropertySchema
Sets the description.
Sourcepub fn with_default(self, default: PluginValue) -> PropertySchema
pub fn with_default(self, default: PluginValue) -> PropertySchema
Sets the default value.
Trait Implementations§
Source§impl Clone for PropertySchema
impl Clone for PropertySchema
Source§fn clone(&self) -> PropertySchema
fn clone(&self) -> PropertySchema
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 PropertySchema
impl Debug for PropertySchema
Source§impl<'de> Deserialize<'de> for PropertySchema
impl<'de> Deserialize<'de> for PropertySchema
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PropertySchema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PropertySchema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PropertySchema
impl Serialize for PropertySchema
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
Auto Trait Implementations§
impl Freeze for PropertySchema
impl RefUnwindSafe for PropertySchema
impl Send for PropertySchema
impl Sync for PropertySchema
impl Unpin for PropertySchema
impl UnsafeUnpin for PropertySchema
impl UnwindSafe for PropertySchema
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