Struct multiversx_sc_snippets::imports::BytesValue
source · pub struct BytesValue {
pub value: Vec<u8>,
pub original: ValueSubTree,
}
Fields§
§value: Vec<u8>
§original: ValueSubTree
Implementations§
source§impl BytesValue
impl BytesValue
pub fn empty() -> BytesValue
Trait Implementations§
source§impl<Env> AnnotatedValue<Env, ManagedBuffer<<Env as TxEnv>::Api>> for &BytesValuewhere
Env: TxEnv,
impl<Env> AnnotatedValue<Env, ManagedBuffer<<Env as TxEnv>::Api>> for &BytesValuewhere
Env: TxEnv,
fn annotation(&self, _env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>
source§fn to_value(&self, _env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>
fn to_value(&self, _env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>
Produces the value from a reference of the annotated type. Might involve a
.clone()
in some cases.source§fn into_value(self, env: &Env) -> T
fn into_value(self, env: &Env) -> T
Consumes annotated value to produce actual value. Read more
source§impl<Env> AnnotatedValue<Env, ManagedBuffer<<Env as TxEnv>::Api>> for BytesValuewhere
Env: TxEnv,
impl<Env> AnnotatedValue<Env, ManagedBuffer<<Env as TxEnv>::Api>> for BytesValuewhere
Env: TxEnv,
fn annotation(&self, _env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>
source§fn to_value(&self, _env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>
fn to_value(&self, _env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>
Produces the value from a reference of the annotated type. Might involve a
.clone()
in some cases.source§fn into_value(self, env: &Env) -> T
fn into_value(self, env: &Env) -> T
Consumes annotated value to produce actual value. Read more
source§impl Checkable<&TxFunctionName> for BytesValue
impl Checkable<&TxFunctionName> for BytesValue
fn check(&self, value: &TxFunctionName) -> bool
source§impl Clone for BytesValue
impl Clone for BytesValue
source§fn clone(&self) -> BytesValue
fn clone(&self) -> BytesValue
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 Debug for BytesValue
impl Debug for BytesValue
source§impl Default for BytesValue
impl Default for BytesValue
source§fn default() -> BytesValue
fn default() -> BytesValue
Returns the “default value” for a type. Read more
source§impl Display for BytesValue
impl Display for BytesValue
source§impl From<&[u8]> for BytesValue
impl From<&[u8]> for BytesValue
source§fn from(bytes: &[u8]) -> BytesValue
fn from(bytes: &[u8]) -> BytesValue
Converts to this type from the input type.
source§impl From<&BytesKey> for BytesValue
impl From<&BytesKey> for BytesValue
source§fn from(from: &BytesKey) -> BytesValue
fn from(from: &BytesKey) -> BytesValue
Converts to this type from the input type.
source§impl From<&BytesValue> for BytesValue
impl From<&BytesValue> for BytesValue
source§fn from(from: &BytesValue) -> BytesValue
fn from(from: &BytesValue) -> BytesValue
Converts to this type from the input type.
source§impl From<&str> for BytesValue
impl From<&str> for BytesValue
source§fn from(from: &str) -> BytesValue
fn from(from: &str) -> BytesValue
Converts to this type from the input type.
source§impl From<(&str, &InterpreterContext)> for BytesValue
impl From<(&str, &InterpreterContext)> for BytesValue
source§fn from(from: (&str, &InterpreterContext)) -> BytesValue
fn from(from: (&str, &InterpreterContext)) -> BytesValue
Converts to this type from the input type.
source§impl From<()> for BytesValue
impl From<()> for BytesValue
source§fn from(_: ()) -> BytesValue
fn from(_: ()) -> BytesValue
Converts to this type from the input type.
source§impl From<BytesKey> for BytesValue
impl From<BytesKey> for BytesValue
source§fn from(from: BytesKey) -> BytesValue
fn from(from: BytesKey) -> BytesValue
Converts to this type from the input type.
source§impl From<String> for BytesValue
impl From<String> for BytesValue
source§fn from(from: String) -> BytesValue
fn from(from: String) -> BytesValue
Converts to this type from the input type.
source§impl InterpretableFrom<&str> for BytesValue
impl InterpretableFrom<&str> for BytesValue
fn interpret_from(from: &str, context: &InterpreterContext) -> BytesValue
source§impl InterpretableFrom<String> for BytesValue
impl InterpretableFrom<String> for BytesValue
fn interpret_from(from: String, context: &InterpreterContext) -> BytesValue
source§impl InterpretableFrom<ValueSubTree> for BytesValue
impl InterpretableFrom<ValueSubTree> for BytesValue
fn interpret_from( from: ValueSubTree, context: &InterpreterContext ) -> BytesValue
source§impl IntoRaw<ValueSubTree> for BytesValue
impl IntoRaw<ValueSubTree> for BytesValue
fn into_raw(self) -> ValueSubTree
impl<Env> TxCodeValue<Env> for &BytesValuewhere
Env: TxEnv,
impl<Env> TxCodeValue<Env> for BytesValuewhere
Env: TxEnv,
Auto Trait Implementations§
impl Freeze for BytesValue
impl RefUnwindSafe for BytesValue
impl Send for BytesValue
impl Sync for BytesValue
impl Unpin for BytesValue
impl UnwindSafe for BytesValue
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
fn interpret_from(from: &T, _context: &InterpreterContext) -> T
source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more