Struct holochain::sweettest::SweetConductorBatch
source · pub struct SweetConductorBatch(_);
Expand description
A collection of SweetConductors, with methods for operating on the entire collection
Implementations§
source§impl SweetConductorBatch
impl SweetConductorBatch
sourcepub async fn from_configs<C: Into<ConductorConfig>, I: IntoIterator<Item = C>>(
configs: I
) -> SweetConductorBatch
pub async fn from_configs<C: Into<ConductorConfig>, I: IntoIterator<Item = C>>( configs: I ) -> SweetConductorBatch
Map the given ConductorConfigs into SweetConductors, each with its own new TestEnvironments
sourcepub async fn from_config<C: Clone + Into<ConductorConfig>>(
num: usize,
config: C
) -> SweetConductorBatch
pub async fn from_config<C: Clone + Into<ConductorConfig>>( num: usize, config: C ) -> SweetConductorBatch
Create the given number of new SweetConductors, each with its own new TestEnvironments
sourcepub async fn from_standard_config(num: usize) -> SweetConductorBatch
pub async fn from_standard_config(num: usize) -> SweetConductorBatch
Create the given number of new SweetConductors, each with its own new TestEnvironments
sourcepub fn iter(&self) -> impl Iterator<Item = &SweetConductor>
pub fn iter(&self) -> impl Iterator<Item = &SweetConductor>
Iterate over the SweetConductors
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut SweetConductor>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut SweetConductor>
Iterate over the SweetConductors, mutably
sourcepub fn into_inner(self) -> Vec<SweetConductor>
pub fn into_inner(self) -> Vec<SweetConductor>
Convert to a Vec
sourcepub fn get(&self, i: usize) -> Option<&SweetConductor>
pub fn get(&self, i: usize) -> Option<&SweetConductor>
Get the conductor at an index.
sourcepub fn add_conductor(&mut self, c: SweetConductor)
pub fn add_conductor(&mut self, c: SweetConductor)
Add an existing conductor to this batch
sourcepub async fn setup_app(
&mut self,
installed_app_id: &str,
dna_files: &[DnaFile]
) -> ConductorApiResult<SweetAppBatch>
pub async fn setup_app( &mut self, installed_app_id: &str, dna_files: &[DnaFile] ) -> ConductorApiResult<SweetAppBatch>
Opinionated app setup. Creates one app on each Conductor in this batch, creating a new AgentPubKey for each. The created AgentPubKeys can be retrieved via each SweetApp.
sourcepub async fn setup_app_for_zipped_agents(
&mut self,
installed_app_id: &str,
agents: &[AgentPubKey],
dna_files: &[DnaFile]
) -> ConductorApiResult<SweetAppBatch>
pub async fn setup_app_for_zipped_agents( &mut self, installed_app_id: &str, agents: &[AgentPubKey], dna_files: &[DnaFile] ) -> ConductorApiResult<SweetAppBatch>
Opinionated app setup. Creates one app on each Conductor in this batch, using the given agents and DnaFiles.
The number of Agents passed in must be the same as the number of Conductors in this batch. Each Agent will be used to create one app on one Conductor, hence the “zipped” in the function name
Returns a batch of SweetApps, sorted in the same order as the Conductors in this batch.
sourcepub async fn exchange_peer_info(&self)
pub async fn exchange_peer_info(&self)
Let each conductor know about each others’ agents so they can do networking
sourcepub async fn exchange_peer_info_sampled(&self, rng: &mut StdRng, s: usize)
pub async fn exchange_peer_info_sampled(&self, rng: &mut StdRng, s: usize)
Let each conductor know about each others’ agents so they can do networking
sourcepub async fn reveal_peer_info(&self, observer: usize, seen: usize)
pub async fn reveal_peer_info(&self, observer: usize, seen: usize)
Let a conductor know about all agents on some other conductor.
sourcepub async fn force_all_publish_dht_ops(&self)
pub async fn force_all_publish_dht_ops(&self)
Force trigger all dht ops that haven’t received enough validation receipts yet.
Trait Implementations§
source§impl From<SweetConductorBatch> for Vec<SweetConductor>
impl From<SweetConductorBatch> for Vec<SweetConductor>
source§fn from(original: SweetConductorBatch) -> Self
fn from(original: SweetConductorBatch) -> Self
source§impl From<Vec<SweetConductor, Global>> for SweetConductorBatch
impl From<Vec<SweetConductor, Global>> for SweetConductorBatch
source§fn from(original: Vec<SweetConductor>) -> SweetConductorBatch
fn from(original: Vec<SweetConductor>) -> SweetConductorBatch
source§impl Index<usize> for SweetConductorBatch
impl Index<usize> for SweetConductorBatch
source§impl IndexMut<usize> for SweetConductorBatch
impl IndexMut<usize> for SweetConductorBatch
source§impl IntoIterator for SweetConductorBatch
impl IntoIterator for SweetConductorBatch
§type Item = <Vec<SweetConductor, Global> as IntoIterator>::Item
type Item = <Vec<SweetConductor, Global> as IntoIterator>::Item
§type IntoIter = <Vec<SweetConductor, Global> as IntoIterator>::IntoIter
type IntoIter = <Vec<SweetConductor, Global> as IntoIterator>::IntoIter
Auto Trait Implementations§
impl !RefUnwindSafe for SweetConductorBatch
impl Send for SweetConductorBatch
impl Sync for SweetConductorBatch
impl Unpin for SweetConductorBatch
impl !UnwindSafe for SweetConductorBatch
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
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn 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> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn 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 more§fn 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.