Type Alias holochain::prelude::inline_zome::InlineIntegrityZome
source · pub type InlineIntegrityZome = InlineZome<IntegrityZomeMarker>;
Aliased Type§
struct InlineIntegrityZome { /* private fields */ }
Implementations§
source§impl<T> InlineZome<T>
impl<T> InlineZome<T>
pub fn functions(&self) -> Vec<FunctionName, Global>
sourcepub fn function<F, I, O>(self, name: &str, f: F) -> InlineZome<T>where
F: Fn(Box<dyn HostFnApiT, Global>, I) -> Result<O, InlineZomeError> + 'static + Send + Sync,
I: DeserializeOwned + Debug,
O: Serialize + Debug,
pub fn function<F, I, O>(self, name: &str, f: F) -> InlineZome<T>where F: Fn(Box<dyn HostFnApiT, Global>, I) -> Result<O, InlineZomeError> + 'static + Send + Sync, I: DeserializeOwned + Debug, O: Serialize + Debug,
Define a new zome function or callback with the given name
sourcepub fn callback<F, I, O>(self, name: &str, f: F) -> InlineZome<T>where
F: Fn(Box<dyn HostFnApiT, Global>, I) -> Result<O, InlineZomeError> + 'static + Send + Sync,
I: DeserializeOwned + Debug,
O: Serialize + Debug,
👎Deprecated: Alias for function
pub fn callback<F, I, O>(self, name: &str, f: F) -> InlineZome<T>where F: Fn(Box<dyn HostFnApiT, Global>, I) -> Result<O, InlineZomeError> + 'static + Send + Sync, I: DeserializeOwned + Debug, O: Serialize + Debug,
function
Alias for function
sourcepub fn maybe_call(
&self,
api: Box<dyn HostFnApiT, Global>,
name: &FunctionName,
input: ExternIO
) -> Result<Option<ExternIO>, InlineZomeError>
pub fn maybe_call( &self, api: Box<dyn HostFnApiT, Global>, name: &FunctionName, input: ExternIO ) -> Result<Option<ExternIO>, InlineZomeError>
Make a call to an inline zome callback. If the callback doesn’t exist, return None.
sourcepub fn set_global(self, name: impl Into<String>, val: u8) -> InlineZome<T>
pub fn set_global(self, name: impl Into<String>, val: u8) -> InlineZome<T>
Set a global value for this zome.
source§impl InlineZome<IntegrityZomeMarker>
impl InlineZome<IntegrityZomeMarker>
sourcepub fn new<S, E>(
uuid: S,
entry_defs: E,
num_link_types: u8
) -> InlineZome<IntegrityZomeMarker>where
S: Into<String>,
E: IntoIterator<Item = EntryDef>,
pub fn new<S, E>( uuid: S, entry_defs: E, num_link_types: u8 ) -> InlineZome<IntegrityZomeMarker>where S: Into<String>, E: IntoIterator<Item = EntryDef>,
Create a new integrity zome with the given network seed
sourcepub fn new_unique<E>(
entry_defs: E,
num_link_types: u8
) -> InlineZome<IntegrityZomeMarker>where
E: IntoIterator<Item = EntryDef>,
pub fn new_unique<E>( entry_defs: E, num_link_types: u8 ) -> InlineZome<IntegrityZomeMarker>where E: IntoIterator<Item = EntryDef>,
Create a new integrity zome with a unique random network seed
Trait Implementations§
source§impl<T> Debug for InlineZome<T>where
T: Debug,
impl<T> Debug for InlineZome<T>where T: Debug,
source§impl<T> Hash for InlineZome<T>where
T: Hash,
impl<T> Hash for InlineZome<T>where T: Hash,
source§impl<T> InlineZomeT for InlineZome<T>where
T: Debug,
impl<T> InlineZomeT for InlineZome<T>where T: Debug,
source§fn functions(&self) -> Vec<FunctionName, Global>
fn functions(&self) -> Vec<FunctionName, Global>
Get the functions for this
InlineZome
.source§fn maybe_call(
&self,
api: Box<dyn HostFnApiT, Global>,
name: &FunctionName,
input: ExternIO
) -> Result<Option<ExternIO>, InlineZomeError>
fn maybe_call( &self, api: Box<dyn HostFnApiT, Global>, name: &FunctionName, input: ExternIO ) -> Result<Option<ExternIO>, InlineZomeError>
Make a call to an inline zome function.
If the function doesn’t exist, return None.
source§impl<T> Ord for InlineZome<T>where
T: Ord,
impl<T> Ord for InlineZome<T>where T: Ord,
source§fn cmp(&self, other: &InlineZome<T>) -> Ordering
fn cmp(&self, other: &InlineZome<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T> PartialEq<InlineZome<T>> for InlineZome<T>where
T: PartialEq<T>,
impl<T> PartialEq<InlineZome<T>> for InlineZome<T>where T: PartialEq<T>,
source§fn eq(&self, other: &InlineZome<T>) -> bool
fn eq(&self, other: &InlineZome<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> PartialOrd<InlineZome<T>> for InlineZome<T>where
T: PartialOrd<T>,
impl<T> PartialOrd<InlineZome<T>> for InlineZome<T>where T: PartialOrd<T>,
source§fn partial_cmp(&self, other: &InlineZome<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &InlineZome<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more