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 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,
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,
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 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
Returns the “default value” for a type. Read more
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
Converts to this type from the input type.
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 = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
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>
Deserializes using the given deserializer
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>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if 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
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more