#[repr(C)]pub struct UserAdminStruct {
pub user_admin_account: Pubkey,
pub state: u8,
}Fields§
§user_admin_account: PubkeyThe account of admin.
state: u8true if the use is admin and false the use is deleted .
Implementations§
Source§impl UserAdminStruct
impl UserAdminStruct
Sourcepub fn add_admin(&mut self, user_admin_account: Pubkey) -> ProgramResult
pub fn add_admin(&mut self, user_admin_account: Pubkey) -> ProgramResult
add new user admin
Sourcepub fn delete_admin(&mut self) -> ProgramResult
pub fn delete_admin(&mut self) -> ProgramResult
delete an admin from the list
Trait Implementations§
Source§impl Clone for UserAdminStruct
impl Clone for UserAdminStruct
Source§fn clone(&self) -> UserAdminStruct
fn clone(&self) -> UserAdminStruct
Returns a duplicate 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 UserAdminStruct
impl Debug for UserAdminStruct
Source§impl Default for UserAdminStruct
impl Default for UserAdminStruct
Source§fn default() -> UserAdminStruct
fn default() -> UserAdminStruct
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UserAdminStruct
impl<'de> Deserialize<'de> for UserAdminStruct
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 PartialEq for UserAdminStruct
impl PartialEq for UserAdminStruct
Source§impl Serialize for UserAdminStruct
impl Serialize for UserAdminStruct
impl StructuralPartialEq for UserAdminStruct
Auto Trait Implementations§
impl Freeze for UserAdminStruct
impl RefUnwindSafe for UserAdminStruct
impl Send for UserAdminStruct
impl Sync for UserAdminStruct
impl Unpin for UserAdminStruct
impl UnwindSafe for UserAdminStruct
Blanket Implementations§
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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