pub struct ManualReply<T: ?Sized>(/* private fields */);
๐Deprecated since 0.18.0: Please use
std::marker::PhantomData
with manual_reply instead.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 const fn empty() -> Self
๐Deprecated since 0.18.0: The api::call
module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance.
pub const fn empty() -> Self
api::call
module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance.Constructs a new ManualReply
.
Sourcepub fn all<U>(value: U) -> Selfwhere
U: ArgumentEncoder,
๐Deprecated since 0.18.0: The api::call
module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance.
pub fn all<U>(value: U) -> Selfwhere
U: ArgumentEncoder,
api::call
module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance.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,
๐Deprecated since 0.18.0: The api::call
module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance.
pub fn one<U>(value: U) -> Selfwhere
U: CandidType,
api::call
module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance.Replies with a one-element tuple around the given value and returns
a new ManualReply
, for a useful reply-then-return shortcut.
Sourcepub fn reject(message: impl AsRef<str>) -> Self
๐Deprecated since 0.18.0: The api::call
module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance.
pub fn reject(message: impl AsRef<str>) -> Self
api::call
module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance.Rejects the call with the specified message 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