Skip to main content

Ed25519VerifyInternalArgs

Struct Ed25519VerifyInternalArgs 

Source
#[repr(C)]
pub struct Ed25519VerifyInternalArgs {
Show 15 fields pub public_key_ptr: u64, pub public_key_size: u32, pub public_key_capacity: u32, pub signature_ptr: u64, pub signature_size: u32, pub signature_capacity: u32, pub message_ptr: u64, pub message_size: u32, pub message_capacity: u32, pub result_ptr: u64, pub public_key: Ed25519PublicKey, pub signature: Ed25519Signature, pub message: [u8; 32], pub result: bool, pub padding: [u8; 7],
}
Expand description

Helper data structure for Benchmarks::ed25519_verify() method

Fields§

§public_key_ptr: u64§public_key_size: u32§public_key_capacity: u32§signature_ptr: u64§signature_size: u32§signature_capacity: u32§message_ptr: u64§message_size: u32§message_capacity: u32§result_ptr: u64§public_key: Ed25519PublicKey§signature: Ed25519Signature§message: [u8; 32]§result: bool§padding: [u8; 7]

Explicit trailing padding.

The host copies the byte representation of this data structure into guest memory, which is only sound if every byte of it is initialized, hence implicit padding must not exist here.

Implementations§

Source§

impl Ed25519VerifyInternalArgs

Source

pub fn new( internal_args_addr: u64, public_key: Ed25519PublicKey, signature: Ed25519Signature, message: [u8; 32], ) -> Self

Create a new instance

Source

pub fn result(&self) -> bool

Extract result

Trait Implementations§

Source§

impl AnyBitPatternMarker for Ed25519VerifyInternalArgs
where for<'__ab_io_type, '__ab_io_type, '__ab_io_type, '__ab_io_type> u64: AnyBitPatternMarker, for<'__ab_io_type, '__ab_io_type, '__ab_io_type, '__ab_io_type, '__ab_io_type, '__ab_io_type> u32: AnyBitPatternMarker, for<'__ab_io_type> Ed25519PublicKey: AnyBitPatternMarker, for<'__ab_io_type> Ed25519Signature: AnyBitPatternMarker, for<'__ab_io_type> [u8; 32]: AnyBitPatternMarker, for<'__ab_io_type> bool: AnyBitPatternMarker, for<'__ab_io_type> [u8; 7]: AnyBitPatternMarker,

Source§

impl Clone for Ed25519VerifyInternalArgs

Source§

fn clone(&self) -> Ed25519VerifyInternalArgs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Ed25519VerifyInternalArgs

Source§

impl Debug for Ed25519VerifyInternalArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TrivialType for Ed25519VerifyInternalArgs

Source§

const ALIGNMENT: Alignment

Alignment of the type in metadata. Read more
Source§

const METADATA: &[u8]

Data structure metadata in binary form, describing shape and types of the contents, see IoTypeMetadataKind for encoding details.
Source§

fn try_from_bytes_unaligned(bytes: &[u8]) -> Option<(&Unaligned<Self>, &[u8])>

Parse the beginning of bytes, which don’t need to be aligned. Read more
Source§

const SIZE: u32 = _

Source§

final fn try_from_bytes(bytes: &[u8]) -> Option<(&Self, &[u8])>

Parse the beginning of aligned bytes, returns the value and the remaining bytes. Read more
Source§

final fn try_from_bytes_exact(bytes: &[u8]) -> Option<&Self>

Like Self::try_from_bytes(), but returns None if there are more bytes than the value
Source§

final fn try_from_bytes_mut(bytes: &mut [u8]) -> Option<(&mut Self, &mut [u8])>

Like Self::try_from_bytes(), but returns an exclusive reference. Read more
Source§

final fn try_read_unaligned(bytes: &[u8]) -> Option<(Self, &[u8])>

Read a copy from the beginning of bytes, which don’t need to be aligned, returns the value and the remaining bytes
Source§

final fn try_read_unaligned_exact(bytes: &[u8]) -> Option<Self>

Like Self::try_read_unaligned(), but returns None if there are more bytes than the value
Source§

final unsafe fn read_unaligned(bytes: &[u8]) -> Option<Self>

Read unaligned value from memory. Read more
Source§

final unsafe fn read_unaligned_unchecked(bytes: &[u8]) -> Self

Similar to Self::read_unaligned(), but doesn’t do any checks at all. Read more
Source§

final unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>

Create a reference to a type, which is represented by provided memory. Read more
Source§

final unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self

Similar to Self::from_bytes(), but doesn’t do any checks at all. Read more
Source§

final unsafe fn from_bytes_mut(bytes: &mut [u8]) -> Option<&mut Self>

Create a mutable reference to a type, which is represented by provided memory. Read more
Source§

final unsafe fn from_bytes_mut_unchecked(bytes: &mut [u8]) -> &mut Self

Similar to Self::from_bytes_mut(), but doesn’t do any checks at all. Read more
Source§

final fn as_bytes(&self) -> &[u8; ab_io_type::trivial_type::SIZE_OF::<Self>]

Access the underlying byte representation of a data structure
Source§

final unsafe fn as_bytes_mut( &mut self, ) -> &mut [u8; ab_io_type::trivial_type::SIZE_OF::<Self>]

Access the underlying mutable byte representation of a data structure. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IoType for T
where T: TrivialType,

Source§

const METADATA: &'static [u8] = T::METADATA

Data structure metadata in binary form, describing shape and types of the contents, see IoTypeMetadataKind for encoding details
Source§

type PointerType = T

Pointer with a trivial type that this IoType represents
Source§

type WithLifetime<'b> = T

The same type, viewing memory borrowed for 'b. Read more
Source§

type Reborrowed<'b> = &'b mut T

Exclusive access to a value for 'b, which Self::reborrow_mut() returns. Read more
Source§

fn size(&self) -> u32

Number of bytes that are currently used to store data
Source§

fn capacity(&self) -> u32

Number of bytes are allocated right now
Source§

unsafe fn set_size(&mut self, size: u32)

Set the number of used bytes. Read more
Source§

unsafe fn from_ptr<'a>( ptr: &'a NonNull<<T as IoType>::PointerType>, size: &'a u32, capacity: u32, ) -> impl Deref<Target = <T as IoType>::WithLifetime<'a>> + '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 u32, capacity: u32, ) -> impl DerefMut + 'a

Create a mutable reference to a type, which is represented by provided memory. Read more
Source§

unsafe fn try_from_ptr<'a>( ptr: &'a NonNull<<T as IoType>::PointerType>, size: &'a u32, capacity: u32, ) -> Option<impl Deref<Target = <T as IoType>::WithLifetime<'a>> + 'a>

Create a reference to a type, which is represented by provided memory, if the memory holds a valid value. Read more
Source§

unsafe fn try_from_mut_ptr<'a>( ptr: &'a mut NonNull<<T as IoType>::PointerType>, size: &'a mut u32, capacity: u32, ) -> Option<impl DerefMut + 'a>

Like Self::try_from_ptr(), but returns an exclusive reference. Read more
Source§

fn as_ptr(&self) -> NonNull<<T as IoType>::PointerType>

Get a raw pointer to the underlying data. Read more
Source§

fn as_mut_ptr(&mut self) -> NonNull<<T as IoType>::PointerType>

Get an exclusive raw pointer to the underlying data. Read more
Source§

fn reborrow_mut(&mut self) -> <T as IoType>::Reborrowed<'_>

Exclusive access to this value for the duration of the borrow. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more