Struct ic_cdk::api::call::ManualReply
source · pub struct ManualReply<T: ?Sized>(_);Expand description
Pretends to have the Candid type T, but unconditionally errors
when serialized.
Usable, but not required, as metadata when using #[query(manual_reply = true)],
so an accurate Candid file can still be generated.
Implementations§
source§impl<T: ?Sized> ManualReply<T>
impl<T: ?Sized> ManualReply<T>
sourcepub fn all<U>(value: U) -> Selfwhere
U: ArgumentEncoder,
pub fn all<U>(value: U) -> Selfwhere U: ArgumentEncoder,
Replies with the given value and returns a new ManualReply,
for a useful reply-then-return shortcut.
sourcepub fn one<U>(value: U) -> Selfwhere
U: CandidType,
pub fn one<U>(value: U) -> Selfwhere U: CandidType,
Replies with a one-element tuple around the given value and returns
a new ManualReply, for a useful reply-then-return shortcut.
Trait Implementations§
source§impl<T> CandidType for ManualReply<T>where
T: CandidType + ?Sized,
impl<T> CandidType for ManualReply<T>where T: CandidType + ?Sized,
source§impl<T: Clone + ?Sized> Clone for ManualReply<T>
impl<T: Clone + ?Sized> Clone for ManualReply<T>
source§fn clone(&self) -> ManualReply<T>
fn clone(&self) -> ManualReply<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T: Default + ?Sized> Default for ManualReply<T>
impl<T: Default + ?Sized> Default for ManualReply<T>
source§fn default() -> ManualReply<T>
fn default() -> ManualReply<T>
Returns the “default value” for a type. Read more