Struct holochain_types::inline_zome::InlineZomeSet
source · [−]pub struct InlineZomeSet {
pub integrity_zomes: HashMap<&'static str, InlineIntegrityZome>,
pub integrity_order: Vec<&'static str>,
pub coordinator_zomes: HashMap<&'static str, InlineCoordinatorZome>,
pub dependencies: HashMap<ZomeName, ZomeName>,
}
Expand description
A set of inline integrity and coordinator zomes.
Fields
integrity_zomes: HashMap<&'static str, InlineIntegrityZome>
The set of inline zomes that will be installed as the integrity zomes.
Only these affect the DnaHash
.
integrity_order: Vec<&'static str>
The order of the integrity zomes.
coordinator_zomes: HashMap<&'static str, InlineCoordinatorZome>
The set of inline zomes that will be installed as the coordinator zomes.
dependencies: HashMap<ZomeName, ZomeName>
The integrity zome dependencies for coordinator zomes. This is not needed if there is only a single integrity zome.
Implementations
sourceimpl InlineZomeSet
impl InlineZomeSet
sourcepub fn new<I, C>(integrity: I, coordinators: C) -> Selfwhere
I: IntoIterator<Item = (&'static str, String, Vec<EntryDef>, u8)>,
C: IntoIterator<Item = (&'static str, String)>,
pub fn new<I, C>(integrity: I, coordinators: C) -> Selfwhere
I: IntoIterator<Item = (&'static str, String, Vec<EntryDef>, 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) -> Selfwhere
I: IntoIterator<Item = (&'static str, Vec<EntryDef>, u8)>,
C: IntoIterator<Item = &'static str>,
pub fn new_unique<I, C>(integrity: I, coordinators: C) -> Selfwhere
I: IntoIterator<Item = (&'static str, Vec<EntryDef>, 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>,
num_link_types: u8
) -> Self
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>,
num_link_types: u8
) -> Self
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>,
num_link_types: u8
) -> Self
pub fn new_unique_single(
integrity_zome_name: &'static str,
coordinator_zome_name: &'static str,
entry_defs: Vec<EntryDef>,
num_link_types: u8
) -> Self
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) -> Selfwhere
F: Fn(BoxApi, I) -> InlineZomeResult<O> + 'static + Send + Sync,
I: DeserializeOwned + Debug,
O: Serialize + Debug,
pub fn function<F, I, O>(self, zome_name: &'static str, name: &str, f: F) -> Selfwhere
F: Fn(BoxApi, I) -> InlineZomeResult<O> + '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) -> Selfwhere
F: Fn(BoxApi, I) -> InlineZomeResult<O> + '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) -> Selfwhere
F: Fn(BoxApi, I) -> InlineZomeResult<O> + 'static + Send + Sync,
I: DeserializeOwned + Debug,
O: Serialize + Debug,
function
Alias for function
sourcepub fn into_zomes(self) -> (Vec<IntegrityZome>, Vec<CoordinatorZome>)
pub fn into_zomes(self) -> (Vec<IntegrityZome>, Vec<CoordinatorZome>)
Get the inner zomes
sourcepub fn with_dependency(self, from: &'static str, to: &'static str) -> Self
pub fn with_dependency(self, from: &'static str, to: &'static str) -> Self
Add a integrity dependency for a coordinator zome
sourcepub fn get_entry_location(
api: &BoxApi,
index: impl Into<ZomeEntryTypesKey>
) -> EntryDefLocation
pub fn get_entry_location(
api: &BoxApi,
index: impl Into<ZomeEntryTypesKey>
) -> EntryDefLocation
Get the entry def location for committing an entry.
sourcepub fn get_link_filter(
api: &BoxApi,
index: impl Into<ZomeLinkTypesKey>
) -> LinkTypeFilter
pub fn get_link_filter(
api: &BoxApi,
index: impl Into<ZomeLinkTypesKey>
) -> LinkTypeFilter
Generate a link type filter from a link type.
sourcepub fn dep_link_filter(api: &BoxApi) -> LinkTypeFilter
pub fn dep_link_filter(api: &BoxApi) -> LinkTypeFilter
Generate a link type filter for all dependencies of the this zome.
Trait Implementations
sourceimpl Default for InlineZomeSet
impl Default for InlineZomeSet
sourcefn default() -> InlineZomeSet
fn default() -> InlineZomeSet
sourceimpl From<(&'static str, InlineZome<IntegrityZomeMarker>)> for InlineZomeSet
impl From<(&'static str, InlineZome<IntegrityZomeMarker>)> for InlineZomeSet
sourcefn from((z, e): (&'static str, InlineIntegrityZome)) -> Self
fn from((z, e): (&'static str, InlineIntegrityZome)) -> Self
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> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn 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>
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn 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 morefn 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.