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
sourceimpl 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: 'static + Fn(Box<dyn HostFnApiT + 'static, Global>, I) -> Result<O, InlineZomeError> + 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: 'static + Fn(Box<dyn HostFnApiT + 'static, Global>, I) -> Result<O, InlineZomeError> + 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: 'static + Fn(Box<dyn HostFnApiT + 'static, Global>, I) -> Result<O, InlineZomeError> + 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: 'static + Fn(Box<dyn HostFnApiT + 'static, Global>, I) -> Result<O, InlineZomeError> + 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 + 'static, Global>,
index: impl Into<ZomeTypesKey<EntryDefIndex>>
) -> EntryDefLocation
pub fn get_entry_location(
api: &Box<dyn HostFnApiT + 'static, 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 + 'static, Global>,
index: impl Into<ZomeTypesKey<LinkType>>
) -> LinkTypeFilter
pub fn get_link_filter(
api: &Box<dyn HostFnApiT + 'static, 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 + 'static, Global>
) -> LinkTypeFilter
pub fn dep_link_filter(
api: &Box<dyn HostFnApiT + 'static, Global>
) -> 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(_: (&'static str, InlineZome<IntegrityZomeMarker>)) -> InlineZomeSet
fn from(_: (&'static str, InlineZome<IntegrityZomeMarker>)) -> InlineZomeSet
sourceimpl From<SweetInlineZomes> for InlineZomeSet
impl From<SweetInlineZomes> for InlineZomeSet
sourcefn from(s: SweetInlineZomes) -> Self
fn from(s: SweetInlineZomes) -> 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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
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.impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
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>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;