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
)