Struct holochain::prelude::InlineZomeSet
source · pub struct InlineZomeSet {
pub integrity_zomes: HashMap<&'static str, InlineZome<IntegrityZomeMarker>, RandomState>,
pub integrity_order: Vec<&'static str, Global>,
pub coordinator_zomes: HashMap<&'static str, InlineZome<CoordinatorZomeMarker>, RandomState>,
pub dependencies: HashMap<ZomeName, ZomeName, RandomState>,
}
Expand description
A set of inline integrity and coordinator zomes.
Fields§
§integrity_zomes: HashMap<&'static str, InlineZome<IntegrityZomeMarker>, RandomState>
The set of inline zomes that will be installed as the integrity zomes.
Only these affect the DnaHash
.
integrity_order: Vec<&'static str, Global>
The order of the integrity zomes.
coordinator_zomes: HashMap<&'static str, InlineZome<CoordinatorZomeMarker>, RandomState>
The set of inline zomes that will be installed as the coordinator zomes.
dependencies: HashMap<ZomeName, ZomeName, RandomState>
The integrity zome dependencies for coordinator zomes. This is not needed if there is only a single integrity zome.
Implementations§
source§impl InlineZomeSet
impl InlineZomeSet
sourcepub fn new<I, C>(integrity: I, coordinators: C) -> InlineZomeSetwhere
I: IntoIterator<Item = (&'static str, String, Vec<EntryDef, Global>, u8)>,
C: IntoIterator<Item = (&'static str, String)>,
pub fn new<I, C>(integrity: I, coordinators: C) -> InlineZomeSetwhere I: IntoIterator<Item = (&'static str, String, Vec<EntryDef, Global>, u8)>, C: IntoIterator<Item = (&'static str, String)>,
Create a set of integrity and coordinators zomes.
sourcepub fn new_unique<I, C>(integrity: I, coordinators: C) -> InlineZomeSetwhere
I: IntoIterator<Item = (&'static str, Vec<EntryDef, Global>, u8)>,
C: IntoIterator<Item = &'static str>,
pub fn new_unique<I, C>(integrity: I, coordinators: C) -> InlineZomeSetwhere I: IntoIterator<Item = (&'static str, Vec<EntryDef, Global>, u8)>, C: IntoIterator<Item = &'static str>,
Create a unique set of integrity and coordinators zomes.
sourcepub fn new_single(
integrity_zome_name: &'static str,
coordinator_zome_name: &'static str,
integrity_uuid: impl Into<String>,
coordinator_uuid: impl Into<String>,
entry_defs: Vec<EntryDef, Global>,
num_link_types: u8
) -> InlineZomeSet
pub fn new_single( integrity_zome_name: &'static str, coordinator_zome_name: &'static str, integrity_uuid: impl Into<String>, coordinator_uuid: impl Into<String>, entry_defs: Vec<EntryDef, Global>, num_link_types: u8 ) -> InlineZomeSet
A helper function to create a single integrity and coordinator zome.
sourcepub fn new_unique_single(
integrity_zome_name: &'static str,
coordinator_zome_name: &'static str,
entry_defs: Vec<EntryDef, Global>,
num_link_types: u8
) -> InlineZomeSet
pub fn new_unique_single( integrity_zome_name: &'static str, coordinator_zome_name: &'static str, entry_defs: Vec<EntryDef, Global>, num_link_types: u8 ) -> InlineZomeSet
A helper function to create a unique single integrity and coordinator zome.
sourcepub fn function<F, I, O>(
self,
zome_name: &'static str,
name: &str,
f: F
) -> InlineZomeSetwhere
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, zome_name: &'static str, name: &str, f: F ) -> InlineZomeSetwhere F: Fn(Box<dyn HostFnApiT, Global>, I) -> Result<O, InlineZomeError> + 'static + Send + Sync, I: DeserializeOwned + Debug, O: Serialize + Debug,
Add a callback to a zome with the given name.
Panics
Panics if the zome_name doesn’t exist for a zome in either set.
sourcepub fn callback<F, I, O>(
self,
zome_name: &'static str,
name: &str,
f: F
) -> InlineZomeSetwhere
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, zome_name: &'static str, name: &str, f: F ) -> InlineZomeSetwhere 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 merge(self, other: InlineZomeSet) -> InlineZomeSet
pub fn merge(self, other: InlineZomeSet) -> InlineZomeSet
sourcepub fn into_zomes(
self
) -> (Vec<Zome<IntegrityZomeDef>, Global>, Vec<Zome<CoordinatorZomeDef>, Global>)
pub fn into_zomes( self ) -> (Vec<Zome<IntegrityZomeDef>, Global>, Vec<Zome<CoordinatorZomeDef>, Global>)
Get the inner zomes
sourcepub fn with_dependency(
self,
from: &'static str,
to: &'static str
) -> InlineZomeSet
pub fn with_dependency( self, from: &'static str, to: &'static str ) -> InlineZomeSet
Add a integrity dependency for a coordinator zome
sourcepub fn get_entry_location(
api: &Box<dyn HostFnApiT, Global>,
index: impl Into<ZomeTypesKey<EntryDefIndex>>
) -> EntryDefLocation
pub fn get_entry_location( api: &Box<dyn HostFnApiT, Global>, index: impl Into<ZomeTypesKey<EntryDefIndex>> ) -> EntryDefLocation
Get the entry def location for committing an entry.
sourcepub fn get_link_filter(
api: &Box<dyn HostFnApiT, Global>,
index: impl Into<ZomeTypesKey<LinkType>>
) -> LinkTypeFilter
pub fn get_link_filter( api: &Box<dyn HostFnApiT, Global>, index: impl Into<ZomeTypesKey<LinkType>> ) -> LinkTypeFilter
Generate a link type filter from a link type.
sourcepub fn dep_link_filter(api: &Box<dyn HostFnApiT, Global>) -> LinkTypeFilter
pub fn dep_link_filter(api: &Box<dyn HostFnApiT, Global>) -> LinkTypeFilter
Generate a link type filter for all dependencies of the this zome.
Trait Implementations§
source§impl Default for InlineZomeSet
impl Default for InlineZomeSet
source§fn default() -> InlineZomeSet
fn default() -> InlineZomeSet
source§impl From<(&'static str, InlineZome<IntegrityZomeMarker>)> for InlineZomeSet
impl From<(&'static str, InlineZome<IntegrityZomeMarker>)> for InlineZomeSet
source§fn from(_: (&'static str, InlineZome<IntegrityZomeMarker>)) -> InlineZomeSet
fn from(_: (&'static str, InlineZome<IntegrityZomeMarker>)) -> InlineZomeSet
Auto Trait Implementations§
impl !RefUnwindSafe for InlineZomeSet
impl Send for InlineZomeSet
impl Sync for InlineZomeSet
impl Unpin for InlineZomeSet
impl !UnwindSafe for InlineZomeSet
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.