Struct OneshotRegistrar
pub struct OneshotRegistrar<T, CODEC = Bincode>{ /* private fields */ }
Expand description
A registrar for oneshot workers.
Implementations§
§impl<N, CODEC> OneshotRegistrar<N, CODEC>
impl<N, CODEC> OneshotRegistrar<N, CODEC>
pub fn new() -> OneshotRegistrar<N, CODEC>
pub fn new() -> OneshotRegistrar<N, CODEC>
Creates a new Oneshot Registrar.
pub fn encoding<C>(&self) -> OneshotRegistrar<N, C>where
C: Codec + 'static,
pub fn encoding<C>(&self) -> OneshotRegistrar<N, C>where
C: Codec + 'static,
Sets the encoding.
pub fn register(&self)where
<N as Oneshot>::Input: Serialize + for<'de> Deserialize<'de>,
<N as Future>::Output: Serialize + for<'de> Deserialize<'de>,
pub fn register(&self)where
<N as Oneshot>::Input: Serialize + for<'de> Deserialize<'de>,
<N as Future>::Output: Serialize + for<'de> Deserialize<'de>,
Registers the worker.
Trait Implementations§
§impl<T, CODEC> Debug for OneshotRegistrar<T, CODEC>
impl<T, CODEC> Debug for OneshotRegistrar<T, CODEC>
§impl<T, CODEC> Default for OneshotRegistrar<T, CODEC>
impl<T, CODEC> Default for OneshotRegistrar<T, CODEC>
§fn default() -> OneshotRegistrar<T, CODEC>
fn default() -> OneshotRegistrar<T, CODEC>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T, CODEC> Freeze for OneshotRegistrar<T, CODEC>
impl<T, CODEC = Bincode> !RefUnwindSafe for OneshotRegistrar<T, CODEC>
impl<T, CODEC = Bincode> !Send for OneshotRegistrar<T, CODEC>
impl<T, CODEC = Bincode> !Sync for OneshotRegistrar<T, CODEC>
impl<T, CODEC> Unpin for OneshotRegistrar<T, CODEC>where
CODEC: Unpin,
impl<T, CODEC = Bincode> !UnwindSafe for OneshotRegistrar<T, CODEC>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.