Skip to main content

Multisig

Struct Multisig 

Source
pub struct Multisig { /* private fields */ }
Expand description

Multisignature data.

Implementations§

Source§

impl Multisig

Source

pub const LEN: usize

The length of the Multisig account data.

Source

pub fn from_account_view( account_view: &AccountView, ) -> Result<Ref<'_, Multisig>, ProgramError>

Return a Multisig from the given account view.

This method performs owner and length validation on AccountView, safe borrowing the account data.

Source

pub unsafe fn from_account_view_unchecked( account_view: &AccountView, ) -> Result<&Self, ProgramError>

Return a Multisig from the given account view.

This method performs owner and length validation on AccountView, but does not perform the borrow check.

§Safety

The caller must ensure that it is safe to borrow the account data (e.g., there are no mutable borrows of the account data).

Source

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

Return a Multisig from the given bytes.

§Safety

The caller must ensure that bytes contains a valid representation of Multisig, and it has the correct length to be interpreted as an instance of Multisig.

Source

pub const fn required_signers(&self) -> u8

Number of signers required to validate the Multisig signature.

Source

pub const fn signers_len(&self) -> usize

Number of signer addresses present on the Multisig.

Source

pub fn signers(&self) -> &[Address]

Return the signer addresses of the Multisig.

Source

pub fn is_initialized(&self) -> bool

Check whether the multisig is initialized or not.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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.