[][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.


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

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,