[][src]Struct hdk::entry_definition::ValidatingEntryType

pub struct ValidatingEntryType {
    pub name: EntryType,
    pub entry_type_definition: EntryTypeDef,
    pub package_creator: PackageCreator,
    pub validator: Validator,
    pub links: Vec<ValidatingLinkDefinition>,
}

This struct represents a complete entry type definition. It wraps EntryTypeDef defined in the DNA crate which only represents the static parts that show up in the JSON definition of an entry type. What is missing from there is the validation callbacks that can not be defined as JSON and are added here as Box objects (types PackageCreator, Validator, LinkValidator)

Instances of this struct are expected and used in the define_zome! macro. Although possible, a DNA developer does not need to create these instances directly but instead should use the entry! macro for a clean syntax.

Fields

name: EntryType

Name of the entry type

entry_type_definition: EntryTypeDef

All the static aspects of the entry type as

package_creator: PackageCreator

Callback that returns a validation package definition that Holochain reads in order to create the right validation package to pass in to the validator callback on validation.

validator: Validator

This is the validation callback that is used to determine if an entry is valid.

links: Vec<ValidatingLinkDefinition>

Auto Trait Implementations

impl !Send for ValidatingEntryType

impl Sync for ValidatingEntryType

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self