Struct ic_cdk::api::call::ManualReply
source · pub struct ManualReply<T: ?Sized>(/* private fields */);
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
impl<T: Copy + ?Sized> Copy for ManualReply<T>
Auto Trait Implementations§
impl<T> Freeze for ManualReply<T>where
T: ?Sized,
impl<T> RefUnwindSafe for ManualReply<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for ManualReply<T>
impl<T> Sync for ManualReply<T>
impl<T> Unpin for ManualReply<T>
impl<T> UnwindSafe for ManualReply<T>where
T: UnwindSafe + ?Sized,
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
)