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>(cells: I) -> DnaGamutwhere
I: IntoIterator<Item = CellId>,
pub fn new<I>(cells: I) -> DnaGamutwhere
I: IntoIterator<Item = CellId>,
Constructor. Restructure a list of CellIds into the proper format.
pub fn placeholder() -> DnaGamut
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: &HoloHash<Agent>
) -> CellResolution
pub fn resolve_cell(
&self,
spec: DnaVersionSpec,
_agent: &HoloHash<Agent>
) -> 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
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.