pub struct Argument(/* private fields */);Expand description
A buffer to hold canister argument blob.
Implementations§
source§impl Argument
impl Argument
sourcepub fn set_idl_arg<A: CandidType>(&mut self, arg: A)
pub fn set_idl_arg<A: CandidType>(&mut self, arg: A)
Set an IDL Argument. Can only be called at most once.
sourcepub fn set_value_arg(&mut self, arg: IDLValue)
pub fn set_value_arg(&mut self, arg: IDLValue)
Set an IDLValue Argument. Can only be called at most once.
sourcepub fn set_raw_arg(&mut self, arg: Vec<u8>)
pub fn set_raw_arg(&mut self, arg: Vec<u8>)
Set the argument as raw. Can only be called at most once.
sourcepub fn from_raw(raw: Vec<u8>) -> Self
pub fn from_raw(raw: Vec<u8>) -> Self
Creates an argument from an arbitrary blob. Equivalent to set_raw_arg.
sourcepub fn from_candid(tuple: impl ArgumentEncoder) -> Self
pub fn from_candid(tuple: impl ArgumentEncoder) -> Self
Creates an argument from an existing Candid ArgumentEncoder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Argument
impl !RefUnwindSafe for Argument
impl Send for Argument
impl Sync for Argument
impl Unpin for Argument
impl !UnwindSafe for Argument
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