pub struct SweetConductorBatch(_);
Expand description

A collection of SweetConductors, with methods for operating on the entire collection

Implementations§

source§

impl SweetConductorBatch

source

pub async fn from_configs<C, I>(configs: I) -> SweetConductorBatchwhere C: Into<SweetConductorConfig>, I: IntoIterator<Item = C>,

Map the given ConductorConfigs into SweetConductors, each with its own new TestEnvironments

source

pub async fn from_configs_rendezvous<C, I, R>( configs: I, rendezvous: R ) -> SweetConductorBatchwhere C: Into<SweetConductorConfig>, I: IntoIterator<Item = C>, R: Into<DynSweetRendezvous>,

Map the given ConductorConfigs into SweetConductors, each with its own new TestEnvironments

source

pub async fn from_config<C: Clone + Into<SweetConductorConfig>>( num: usize, config: C ) -> SweetConductorBatch

Create the given number of new SweetConductors, each with its own new TestEnvironments

source

pub async fn from_standard_config(num: usize) -> SweetConductorBatch

Create the given number of new SweetConductors, each with its own new TestEnvironments

source

pub fn iter(&self) -> impl Iterator<Item = &SweetConductor>

Iterate over the SweetConductors

source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut SweetConductor>

Iterate over the SweetConductors, mutably

source

pub fn into_inner(self) -> Vec<SweetConductor>

Convert to a Vec

source

pub fn get(&self, i: usize) -> Option<&SweetConductor>

Get the conductor at an index.

source

pub fn add_conductor(&mut self, c: SweetConductor)

Add an existing conductor to this batch

source

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.

source

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.

source

pub async fn exchange_peer_info(&self)

Let each conductor know about each others’ agents so they can do networking

source

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

source

pub async fn reveal_peer_info(&self, observer: usize, seen: usize)

Let a conductor know about all agents on some other conductor.

source

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>

source§

fn from(original: SweetConductorBatch) -> Self

Converts to this type from the input type.
source§

impl From<Vec<SweetConductor, Global>> for SweetConductorBatch

source§

fn from(original: Vec<SweetConductor>) -> SweetConductorBatch

Converts to this type from the input type.
source§

impl Index<usize> for SweetConductorBatch

§

type Output = SweetConductor

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<usize> for SweetConductorBatch

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IntoIterator for SweetConductorBatch

§

type Item = <Vec<SweetConductor, Global> as IntoIterator>::Item

The type of the elements being iterated over.
§

type IntoIter = <Vec<SweetConductor, Global> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for Twhere T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for Twhere T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync + 'static>

§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

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,

§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

§

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

Checks if self is actually part of its subset T (and can be converted to it).
§

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

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,

§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
§

fn upcast_any_box(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

upcast boxed dyn
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more