Struct ManualReply

Source
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>

Source

pub 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.

Constructs a new ManualReply.

Source

pub fn all<U>(value: U) -> Self
where 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.

Replies with the given value and returns a new ManualReply, for a useful reply-then-return shortcut.

Source

pub fn one<U>(value: U) -> Self
where 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.

Replies with a one-element tuple around the given value and returns a new ManualReply, for a useful reply-then-return shortcut.

Source

pub 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.

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,

Sourceยง

fn idl_serialize<S>(&self, _: S) -> Result<(), S::Error>
where S: Serializer,

Unconditionally errors.

Sourceยง

fn _ty() -> Type

Sourceยง

fn ty() -> Type

Sourceยง

fn id() -> TypeId

Sourceยง

impl<T: Clone + ?Sized> Clone for ManualReply<T>

Sourceยง

fn clone(&self) -> ManualReply<T>

Returns a copy of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl<T: Debug + ?Sized> Debug for ManualReply<T>

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl<T: Default + ?Sized> Default for ManualReply<T>

Sourceยง

fn default() -> ManualReply<T>

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

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>
where T: Send + ?Sized,

ยง

impl<T> Sync for ManualReply<T>
where T: Sync + ?Sized,

ยง

impl<T> Unpin for ManualReply<T>
where T: Unpin + ?Sized,

ยง

impl<T> UnwindSafe for ManualReply<T>
where T: UnwindSafe + ?Sized,

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
OSZAR »