pub struct RecordTypeFragment { /* private fields */ }Expand description
Named record-type definition.
Implementations§
Source§impl RecordTypeFragment
impl RecordTypeFragment
Sourcepub fn try_new(
name: SchemaName,
fields: Vec<RecordFieldFragment>,
) -> Result<Self, SchemaContractError>
pub fn try_new( name: SchemaName, fields: Vec<RecordFieldFragment>, ) -> Result<Self, SchemaContractError>
Construct and canonicalize a record definition.
§Errors
Returns a typed contract error for overflow, duplicates, or malformed fields.
Sourcepub const fn source_key(&self) -> &TypeSourceKey
pub const fn source_key(&self) -> &TypeSourceKey
Borrow the typed proposal key derived from the current record name.
Sourcepub const fn name(&self) -> &SchemaName
pub const fn name(&self) -> &SchemaName
Borrow the current record name.
Sourcepub fn fields(&self) -> &[RecordFieldFragment]
pub fn fields(&self) -> &[RecordFieldFragment]
Borrow canonical record fields.
Trait Implementations§
Source§impl CandidType for RecordTypeFragment
impl CandidType for RecordTypeFragment
Source§impl Clone for RecordTypeFragment
impl Clone for RecordTypeFragment
Source§fn clone(&self) -> RecordTypeFragment
fn clone(&self) -> RecordTypeFragment
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 RecordTypeFragment
impl Debug for RecordTypeFragment
Source§impl<'de> Deserialize<'de> for RecordTypeFragment
impl<'de> Deserialize<'de> for RecordTypeFragment
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
impl Eq for RecordTypeFragment
Source§impl PartialEq for RecordTypeFragment
impl PartialEq for RecordTypeFragment
Source§impl Serialize for RecordTypeFragment
impl Serialize for RecordTypeFragment
impl StructuralPartialEq for RecordTypeFragment
Auto Trait Implementations§
impl Freeze for RecordTypeFragment
impl RefUnwindSafe for RecordTypeFragment
impl Send for RecordTypeFragment
impl Sync for RecordTypeFragment
impl Unpin for RecordTypeFragment
impl UnsafeUnpin for RecordTypeFragment
impl UnwindSafe for RecordTypeFragment
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