pub struct HexCallDataSerializer(/* private fields */);
Expand description
Serializes to the MultiversX smart contract call format.
This format consists of the function name, followed by ‘@’, follwed by hex-encoded argument bytes separated by ‘@’ characters. Example: “funcName@00000@aaaa@1234@@”. Arguments can be empty, in which case no hex digits are emitted. Argument hex encodings will always have an even number of digits.
HexCallDataSerializer owns its output.
Converting from whatever type the argument to bytes is not in scope. Use the serializer
module for that.
Implementations§
Source§impl HexCallDataSerializer
impl HexCallDataSerializer
pub fn new(endpoint_name: &[u8]) -> Self
pub fn from_arg_buffer(endpoint_name: &[u8], arg_buffer: &ArgBuffer) -> Self
pub fn from_managed_arg_buffer<M: ManagedTypeApi>( endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M>, ) -> Self
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn into_vec(self) -> Vec<u8> ⓘ
pub fn push_argument_bytes(&mut self, bytes: &[u8])
Auto Trait Implementations§
impl Freeze for HexCallDataSerializer
impl RefUnwindSafe for HexCallDataSerializer
impl Send for HexCallDataSerializer
impl Sync for HexCallDataSerializer
impl Unpin for HexCallDataSerializer
impl UnwindSafe for HexCallDataSerializer
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