GenChildSpec

Struct GenChildSpec 

Source
pub struct GenChildSpec<B, A, M, X> { /* private fields */ }
Expand description

A base for both uniform and mixed child specifications.

Implementations§

Source§

impl GenChildSpec<(), (), (), ()>

Source

pub fn new() -> Self

Source§

impl<X> GenChildSpec<(), (), (), X>

Source

pub fn from_ext(ext: X) -> Self

Source§

impl<B, A, M, X> GenChildSpec<B, A, M, X>

Source

pub fn ext(&self) -> &X

Source

pub fn ext_mut(&mut self) -> &mut X

Source§

impl<A, M, X> GenChildSpec<(), A, M, X>

Source

pub fn behaviour<B>(self, behaviour: B) -> GenChildSpec<B, A, M, X>

Source§

impl<B, OldA, OldM, X> GenChildSpec<B, OldA, OldM, X>

Source

pub fn args_clone<A, M>(self, args: A) -> GenChildSpec<B, ArgsClone<A>, M, X>
where B: for<'a> Actor<'a, A, M>, ArgsClone<A>: CreateArgs<Input = (), Output = A>,

Source

pub fn args_unique<A, M>(self, args: A) -> GenChildSpec<B, ArgsUnique<A>, M, X>
where B: for<'a> Actor<'a, Option<A>, M>, ArgsUnique<A>: CreateArgs<Input = (), Output = Option<A>>,

Source

pub fn args_call0<F, Out, M>( self, make_args: F, ) -> GenChildSpec<B, ArgsCallFn0<F, Out>, M, X>
where B: for<'a> Actor<'a, Out, M>, ArgsCallFn0<F, Out>: CreateArgs<Input = (), Output = Out>,

Source

pub fn args_call1<F, In, Out, M>( self, make_args: F, ) -> GenChildSpec<B, ArgsCallFn1<F, In, Out>, M, X>
where B: for<'a> Actor<'a, Out, M>, ArgsCallFn1<F, In, Out>: CreateArgs<Input = In, Output = Out>,

Source§

impl<B, A, M, X> GenChildSpec<B, A, M, X>

Source

pub fn init_type<IT>(self, init_type: IT) -> Self
where IT: Into<InitType>,

Specify child’s init-type

Source§

impl<ID> GenChildSpec<(), (), (), Ext<ID>>

Source

pub fn mixed(id: ID) -> Self

Source§

impl<ID, B, A, M> GenChildSpec<B, A, M, Ext<ID>>

Source

pub fn child_type(self, child_type: ChildType) -> Self

Source

pub fn shutdown(self, shutdown: ShutdownSequence) -> Self

Source§

impl GenChildSpec<(), (), (), Ext>

Source

pub fn uniform() -> Self

Source§

impl<B, A, M> GenChildSpec<B, A, M, Ext>

Source

pub fn with_shutdown_sequence(self, shutdown_sequence: ShutdownSequence) -> Self

Source

pub fn shutdown_sequence(&self) -> &ShutdownSequence

Trait Implementations§

Source§

impl<B, A, M, X> Clone for GenChildSpec<B, A, M, X>
where B: Clone, A: Clone, X: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B, A, M, X> CreateChild for GenChildSpec<B, A, M, X>
where B: for<'a> Actor<'a, A::Output, M> + Clone, A: CreateArgs, M: Unpin + Send + 'static, A::Output: Send + 'static,

Source§

type Args = <A as CreateArgs>::Input

Source§

fn create_child( &mut self, system: &System, sup_id: ActorID, args: Self::Args, ) -> StaticBoxedFuture<Result<ActorID, StartChildError>>

Source§

impl<B, A, M, X> Debug for GenChildSpec<B, A, M, X>
where A: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GenChildSpec<(), (), (), ()>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<ID, B, A, M> From<GenChildSpec<B, A, M, Ext<ID>>> for Box<dyn FlatMixedChildSpec<ID>>
where MixedChildSpec<ID, B, A, M>: FlatMixedChildSpec<ID>,

Source§

fn from(cs: MixedChildSpec<ID, B, A, M>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<B, A, M, X> Freeze for GenChildSpec<B, A, M, X>
where B: Freeze, A: Freeze, X: Freeze,

§

impl<B, A, M, X> RefUnwindSafe for GenChildSpec<B, A, M, X>

§

impl<B, A, M, X> Send for GenChildSpec<B, A, M, X>
where B: Send, A: Send, X: Send, M: Send,

§

impl<B, A, M, X> Sync for GenChildSpec<B, A, M, X>
where B: Sync, A: Sync, X: Sync, M: Sync,

§

impl<B, A, M, X> Unpin for GenChildSpec<B, A, M, X>
where B: Unpin, A: Unpin, X: Unpin, M: Unpin,

§

impl<B, A, M, X> UnwindSafe for GenChildSpec<B, A, M, X>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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, U> Into<U> for T
where 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.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
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