pub struct PropertyTypeModel {
pub name: String,
pub value_type: ValueTypeModel,
pub default_value: Option<DefaultValue>,
pub inline_constraint: Option<InlineConstraintModel>,
}Expand description
Persisted form of GraphTypePropertyType.
Fields§
§name: String§value_type: ValueTypeModel§default_value: Option<DefaultValue>The property’s DEFAULT ON COMMIT value (CIP-262), in its
restricted, serde-shaped form.
inline_constraint: Option<InlineConstraintModel>Implementations§
Source§impl PropertyTypeModel
impl PropertyTypeModel
Sourcepub fn capture(s: &GraphTypePropertyType) -> Result<Self, EngineError>
pub fn capture(s: &GraphTypePropertyType) -> Result<Self, EngineError>
Captures one parsed property type, fail-closed on a default value expression that is not a CIP-262 allowed shape.
Trait Implementations§
Source§impl Clone for PropertyTypeModel
impl Clone for PropertyTypeModel
Source§impl Debug for PropertyTypeModel
impl Debug for PropertyTypeModel
Source§impl<'de> Deserialize<'de> for PropertyTypeModel
impl<'de> Deserialize<'de> for PropertyTypeModel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&PropertyTypeModel> for GraphTypePropertyType
impl From<&PropertyTypeModel> for GraphTypePropertyType
Source§fn from(m: &PropertyTypeModel) -> Self
fn from(m: &PropertyTypeModel) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PropertyTypeModel
impl PartialEq for PropertyTypeModel
Source§impl Serialize for PropertyTypeModel
impl Serialize for PropertyTypeModel
impl StructuralPartialEq for PropertyTypeModel
Auto Trait Implementations§
impl Forget for PropertyTypeModel
impl Freeze for PropertyTypeModelwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ValueTypeModel is !null: Freeze,
PhantomData<ValueTypeModel>: Freeze,
PhantomData<DefaultValue>: Freeze,
PhantomData<(String, DefaultValue)>: Freeze,
impl Move for PropertyTypeModel
impl RefUnwindSafe for PropertyTypeModel
impl Send for PropertyTypeModel
impl Sync for PropertyTypeModel
impl Unpin for PropertyTypeModel
impl UnsafeUnpin for PropertyTypeModelwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ValueTypeModel is !null: UnsafeUnpin,
PhantomData<ValueTypeModel>: UnsafeUnpin,
PhantomData<DefaultValue>: UnsafeUnpin,
PhantomData<(String, DefaultValue)>: UnsafeUnpin,
impl UnwindSafe for PropertyTypeModel
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