#[repr(C)]pub struct MethodFingerprint(/* private fields */);
Expand description
Hash of method’s compact metadata, which uniquely represents method signature.
While nothing can be said about method implementation, matching method fingerprint means method
name, inputs and outputs are what they are expected to be (struct and field names are ignored as
explained in ContractMetadataKind::compact
.
Implementations§
Source§impl MethodFingerprint
impl MethodFingerprint
Sourcepub const fn new(method_metadata: &[u8]) -> Option<Self>
pub const fn new(method_metadata: &[u8]) -> Option<Self>
Create a new method fingerprint from its metadata.
None
is returned for invalid metadata (see
ContractMetadataKind::compact_external_args()
for details).
pub const fn to_bytes(&self) -> &Blake3Hash
Trait Implementations§
Source§impl Clone for MethodFingerprint
impl Clone for MethodFingerprint
Source§fn clone(&self) -> MethodFingerprint
fn clone(&self) -> MethodFingerprint
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 MethodFingerprint
impl Debug for MethodFingerprint
Source§impl Display for MethodFingerprint
impl Display for MethodFingerprint
Source§impl Hash for MethodFingerprint
impl Hash for MethodFingerprint
Source§impl Ord for MethodFingerprint
impl Ord for MethodFingerprint
Source§fn cmp(&self, other: &MethodFingerprint) -> Ordering
fn cmp(&self, other: &MethodFingerprint) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MethodFingerprint
impl PartialEq for MethodFingerprint
Source§impl PartialOrd for MethodFingerprint
impl PartialOrd for MethodFingerprint
Source§impl TrivialType for MethodFingerprintwhere
Blake3Hash: TrivialType,
impl TrivialType for MethodFingerprintwhere
Blake3Hash: TrivialType,
Source§const METADATA: &[u8]
const METADATA: &[u8]
Data structure metadata in binary form, describing shape and types of the contents, see
IoTypeMetadataKind
for encoding details.const SIZE: u32 = _
Source§unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>
unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>
Create a reference to a type, which is represented by provided memory. Read more
impl Copy for MethodFingerprint
impl Eq for MethodFingerprint
impl StructuralPartialEq for MethodFingerprint
Auto Trait Implementations§
impl Freeze for MethodFingerprint
impl RefUnwindSafe for MethodFingerprint
impl Send for MethodFingerprint
impl Sync for MethodFingerprint
impl Unpin for MethodFingerprint
impl UnwindSafe for MethodFingerprint
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IoType for Twhere
T: TrivialType,
impl<T> IoType for Twhere
T: TrivialType,
Source§const METADATA: &'static [u8] = T::METADATA
const METADATA: &'static [u8] = T::METADATA
Data structure metadata in binary form, describing shape and types of the contents, see
IoTypeMetadataKind
for encoding detailsSource§type PointerType = T
type PointerType = T
Pointer with trivial type that this
IoType
representsSource§unsafe fn size_ptr(&self) -> impl Deref<Target = NonNull<u32>>
unsafe fn size_ptr(&self) -> impl Deref<Target = NonNull<u32>>
Pointer to the number of bytes that are currently used to store data. Read more
Source§unsafe fn size_mut_ptr(&mut self) -> impl DerefMut
unsafe fn size_mut_ptr(&mut self) -> impl DerefMut
An exclusive pointer to the number of bytes that are currently used to store data. Read more
Source§unsafe fn capacity_ptr(&self) -> impl Deref<Target = NonNull<u32>>
unsafe fn capacity_ptr(&self) -> impl Deref<Target = NonNull<u32>>
Number of bytes are allocated right now Read more
Source§unsafe fn from_ptr<'a>(
ptr: &'a NonNull<<T as IoType>::PointerType>,
size: &'a u32,
capacity: u32,
) -> impl Deref<Target = T> + 'a
unsafe fn from_ptr<'a>( ptr: &'a NonNull<<T as IoType>::PointerType>, size: &'a u32, capacity: u32, ) -> impl Deref<Target = T> + 'a
Create a reference to a type, which is represented by provided memory. Read more
Source§unsafe fn from_mut_ptr<'a>(
ptr: &'a mut NonNull<<T as IoType>::PointerType>,
_size: &'a mut *mut u32,
capacity: u32,
) -> impl DerefMut + 'a
unsafe fn from_mut_ptr<'a>( ptr: &'a mut NonNull<<T as IoType>::PointerType>, _size: &'a mut *mut u32, capacity: u32, ) -> impl DerefMut + 'a
Create a mutable reference to a type, which is represented by provided memory. Read more
Source§unsafe fn as_ptr(
&self,
) -> impl Deref<Target = NonNull<<T as IoType>::PointerType>>
unsafe fn as_ptr( &self, ) -> impl Deref<Target = NonNull<<T as IoType>::PointerType>>
Get a raw pointer to the underlying data with no checks. Read more
Source§unsafe fn as_mut_ptr(&mut self) -> impl DerefMut
unsafe fn as_mut_ptr(&mut self) -> impl DerefMut
Get an exclusive raw pointer to the underlying data with no checks. Read more