Struct freenet_stdlib::prelude::DelegateCode
source · pub struct DelegateCode<'a> { /* private fields */ }
Expand description
Executable delegate
Implementations§
source§impl DelegateCode<'static>
impl DelegateCode<'static>
source§impl DelegateCode<'_>
impl DelegateCode<'_>
sourcepub fn encode_hash(hash: &[u8; 32]) -> String
pub fn encode_hash(hash: &[u8; 32]) -> String
Returns the Base58
string representation of a hash.
pub fn into_owned(self) -> DelegateCode<'static>
pub fn size(&self) -> usize
source§impl DelegateCode<'static>
impl DelegateCode<'static>
sourcepub fn load_versioned_from_path(
path: &Path
) -> Result<(Self, APIVersion), Error>
pub fn load_versioned_from_path( path: &Path ) -> Result<(Self, APIVersion), Error>
Loads contract code which has been versioned from the fs.
sourcepub fn load_versioned_from_bytes(
versioned_code: Vec<u8>
) -> Result<(Self, APIVersion), Error>
pub fn load_versioned_from_bytes( versioned_code: Vec<u8> ) -> Result<(Self, APIVersion), Error>
Loads contract code which has been versioned from the fs.
source§impl DelegateCode<'_>
impl DelegateCode<'_>
pub fn to_bytes_versioned( &self, version: APIVersion ) -> Result<Vec<u8>, Box<dyn Error + Send + Sync + 'static>>
Trait Implementations§
source§impl AsRef<[u8]> for DelegateCode<'_>
impl AsRef<[u8]> for DelegateCode<'_>
source§impl<'a> Clone for DelegateCode<'a>
impl<'a> Clone for DelegateCode<'a>
source§fn clone(&self) -> DelegateCode<'a>
fn clone(&self) -> DelegateCode<'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 DelegateCode<'a>
impl<'a> Debug for DelegateCode<'a>
source§impl<'de: 'a, 'a> Deserialize<'de> for DelegateCode<'a>
impl<'de: 'a, 'a> Deserialize<'de> for DelegateCode<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> From<&'a [u8]> for DelegateCode<'a>
impl<'a> From<&'a [u8]> for DelegateCode<'a>
source§impl PartialEq<DelegateCode<'_>> for DelegateCode<'_>
impl PartialEq<DelegateCode<'_>> for DelegateCode<'_>
source§impl<'a> Serialize for DelegateCode<'a>
impl<'a> Serialize for DelegateCode<'a>
impl Eq for DelegateCode<'_>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for DelegateCode<'a>
impl<'a> Send for DelegateCode<'a>
impl<'a> Sync for DelegateCode<'a>
impl<'a> Unpin for DelegateCode<'a>
impl<'a> UnwindSafe for DelegateCode<'a>
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