pub struct Spawner<PB: ProtocolBehavior> {
registry: PutRegistry<PB>,
descriptors: HashMap<AgentName, PutDescriptor>,
default: PutDescriptor,
}
Fields§
§registry: PutRegistry<PB>
§descriptors: HashMap<AgentName, PutDescriptor>
§default: PutDescriptor
Implementations§
source§impl<PB: ProtocolBehavior> Spawner<PB>
impl<PB: ProtocolBehavior> Spawner<PB>
pub fn new(registry: impl Into<PutRegistry<PB>>) -> Self
pub fn with_mapping(self, descriptors: &[(AgentName, PutDescriptor)]) -> Self
pub fn with_default(self, put: impl Into<PutDescriptor>) -> Self
pub fn spawn( &self, claims: &GlobalClaimList<PB::ProtocolTypes, PB::Claim>, descriptor: &AgentDescriptor, ) -> Result<Agent<PB>, Error>
Trait Implementations§
source§impl<PB: ProtocolBehavior> Clone for Spawner<PB>
impl<PB: ProtocolBehavior> Clone for Spawner<PB>
Auto Trait Implementations§
impl<PB> Freeze for Spawner<PB>
impl<PB> !RefUnwindSafe for Spawner<PB>
impl<PB> !Send for Spawner<PB>
impl<PB> !Sync for Spawner<PB>
impl<PB> Unpin for Spawner<PB>
impl<PB> !UnwindSafe for Spawner<PB>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.