Struct locutus_runtime::prelude::ContractCode
source · pub struct ContractCode<'a> { /* private fields */ }Expand description
The executable contract.
It is the part of the executable belonging to the full specification and does not include any other metadata (like the parameters).
Implementations§
source§impl ContractCode<'_>
impl ContractCode<'_>
sourcepub fn into_bytes(self) -> Vec<u8, Global> ⓘ
pub fn into_bytes(self) -> Vec<u8, Global> ⓘ
Extracts the owned contract code data as a Vec<u8>.
sourcepub fn encode_hash(hash: &[u8; 32]) -> String
pub fn encode_hash(hash: &[u8; 32]) -> String
Returns the Base58 string representation of a hash.
sourcepub fn into_owned(self) -> ContractCode<'static>
pub fn into_owned(self) -> ContractCode<'static>
Copies the data if not owned and returns an owned version of self.
Trait Implementations§
source§impl<'a> Clone for ContractCode<'a>
impl<'a> Clone for ContractCode<'a>
source§fn clone(&self) -> ContractCode<'a>
fn clone(&self) -> ContractCode<'a>
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<'a> Debug for ContractCode<'a>
impl<'a> Debug for ContractCode<'a>
source§impl<'de, 'a> Deserialize<'de> for ContractCode<'a>where
'de: 'a,
impl<'de, 'a> Deserialize<'de> for ContractCode<'a>where
'de: 'a,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ContractCode<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ContractCode<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ContractCode<'_>
impl Display for ContractCode<'_>
source§impl<'a> From<&'a [u8]> for ContractCode<'a>
impl<'a> From<&'a [u8]> for ContractCode<'a>
source§fn from(data: &'a [u8]) -> ContractCode<'a>
fn from(data: &'a [u8]) -> ContractCode<'a>
Converts to this type from the input type.
source§impl PartialEq<ContractCode<'_>> for ContractCode<'_>
impl PartialEq<ContractCode<'_>> for ContractCode<'_>
source§fn eq(&self, other: &ContractCode<'_>) -> bool
fn eq(&self, other: &ContractCode<'_>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'a> Serialize for ContractCode<'a>
impl<'a> Serialize for ContractCode<'a>
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl<'a> TryFromTsStd<&'a Value> for ContractCode<'a>
impl<'a> TryFromTsStd<&'a Value> for ContractCode<'a>
fn try_decode(value: &'a Value) -> Result<ContractCode<'a>, WsApiError>
impl Eq for ContractCode<'_>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ContractCode<'a>
impl<'a> Send for ContractCode<'a>
impl<'a> Sync for ContractCode<'a>
impl<'a> Unpin for ContractCode<'a>
impl<'a> UnwindSafe for ContractCode<'a>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref