pub struct CustomObjectType {
pub id: Uuid,
pub handle: String,
pub display_name: String,
pub description: String,
pub fields: Vec<CustomFieldDefinition>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub version: i32,
}Expand description
Custom object type (schema / definition).
Fields§
§id: Uuid§handle: StringStable identifier (“api name”). Unique across all custom object types.
display_name: StringHuman-friendly name (e.g., “Warranty Registration”).
description: String§fields: Vec<CustomFieldDefinition>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>§version: i32Version for optimistic locking.
Implementations§
Source§impl CustomObjectType
impl CustomObjectType
Sourcepub fn validate_values(&self, values: &Value) -> Result<(), CommerceError>
pub fn validate_values(&self, values: &Value) -> Result<(), CommerceError>
Validate a record values JSON object against this type schema.
Trait Implementations§
Source§impl Clone for CustomObjectType
impl Clone for CustomObjectType
Source§fn clone(&self) -> CustomObjectType
fn clone(&self) -> CustomObjectType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CustomObjectType
impl Debug for CustomObjectType
Source§impl<'de> Deserialize<'de> for CustomObjectType
impl<'de> Deserialize<'de> for CustomObjectType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CustomObjectType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CustomObjectType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CustomObjectType
Source§impl PartialEq for CustomObjectType
impl PartialEq for CustomObjectType
Source§impl Serialize for CustomObjectType
impl Serialize for CustomObjectType
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 CustomObjectType
Auto Trait Implementations§
impl Freeze for CustomObjectType
impl RefUnwindSafe for CustomObjectType
impl Send for CustomObjectType
impl Sync for CustomObjectType
impl Unpin for CustomObjectType
impl UnsafeUnpin for CustomObjectType
impl UnwindSafe for CustomObjectType
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