Struct holochain_types::app::DnaGamut
source · [−]pub struct DnaGamut(_);
Expand description
Representation of all DNAs and Cells available in a given context. When given a DnaVersionSpec, a particular DNA can be selected from this gamut.
Moreover, each DNA hash has associated with it a list of Agents. Each agent represents a Cell which exists on the conductor, using that DNA and agent pair. A DNA with no agents listed is simply registered but does not exist in any Cell.
NB: since our DnaVersionSpec is currently very simplistic, so is the gamut. As our versioning becomes more expressive, so will this type. For instance, if we introduce semver, the gamut will include versions of DNAs as well.
This type basically exists as an abstract adapter between the conductor’s DNA store and the app installation process. Without needing to know exactly what we will need from the DNA store, we can define what questions we will need to ask of it through this type.
Implementations
sourceimpl DnaGamut
impl DnaGamut
sourcepub fn new<I: IntoIterator<Item = CellId>>(cells: I) -> Self
pub fn new<I: IntoIterator<Item = CellId>>(cells: I) -> Self
Constructor. Restructure a list of CellIds into the proper format.
pub fn placeholder() -> Self
Stop using the placeholder
sourcepub fn resolve_dna(&self, spec: DnaVersionSpec) -> DnaResolution
pub fn resolve_dna(&self, spec: DnaVersionSpec) -> DnaResolution
Given a version spec, return the best-matching DNA in the gamut
sourcepub fn resolve_cell(
&self,
spec: DnaVersionSpec,
_agent: &AgentPubKey
) -> CellResolution
pub fn resolve_cell(
&self,
spec: DnaVersionSpec,
_agent: &AgentPubKey
) -> CellResolution
Given a version spec, return the best-matching CellId
Auto Trait Implementations
impl RefUnwindSafe for DnaGamut
impl Send for DnaGamut
impl Sync for DnaGamut
impl Unpin for DnaGamut
impl UnwindSafe for DnaGamut
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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<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<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
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