pub trait LinkTypesHelper {
    type Error;

    fn from_type<Z, I>(
        zome_id: Z,
        link_type: I
    ) -> Result<Option<Self>, Self::Error>
    where
        Z: Into<ZomeId>,
        I: Into<LinkType>
; }
Expand description

A helper trait for finding the app defined link type from a ZomeId and LinkType.

If the zome id is a dependency of the calling zome and the link type is out of range (greater than the number of defined link types) then a guest error is return (which will invalidate an op if used in the validation callback).

If the zome id is not a dependency of the calling zome then this will return None.

Required Associated Types

The error associated with this conversion.

Required Methods

Check if the ZomeId and LinkType matches one of the ZomeLinkTypeKey::from(Self::variant) and if it does return that type.

Implementations on Foreign Types

Implementors