pub enum GovernanceInstruction {
Show 31 variants
CreateRealm {
name: String,
config_args: RealmConfigArgs,
},
DepositGoverningTokens {
amount: u64,
},
WithdrawGoverningTokens {},
SetGovernanceDelegate {
new_governance_delegate: Option<Pubkey>,
},
CreateGovernance {
config: GovernanceConfig,
},
CreateProgramGovernance {
config: GovernanceConfig,
transfer_upgrade_authority: bool,
},
CreateProposal {
name: String,
description_link: String,
vote_type: VoteType,
options: Vec<String>,
use_deny_option: bool,
proposal_seed: Pubkey,
},
AddSignatory {
signatory: Pubkey,
},
Legacy1,
InsertTransaction {
option_index: u8,
index: u16,
hold_up_time: u32,
instructions: Vec<InstructionData>,
},
RemoveTransaction,
CancelProposal,
SignOffProposal,
CastVote {
vote: Vote,
},
FinalizeVote {},
RelinquishVote,
ExecuteTransaction,
CreateMintGovernance {
config: GovernanceConfig,
transfer_mint_authorities: bool,
},
CreateTokenGovernance {
config: GovernanceConfig,
transfer_account_authorities: bool,
},
SetGovernanceConfig {
config: GovernanceConfig,
},
FlagTransactionError,
SetRealmAuthority {
action: SetRealmAuthorityAction,
},
SetRealmConfig {
config_args: RealmConfigArgs,
},
CreateTokenOwnerRecord {},
UpdateProgramMetadata {},
CreateNativeTreasury,
RevokeGoverningTokens {
amount: u64,
},
RefundProposalDeposit {},
CompleteProposal {},
AddRequiredSignatory {
signatory: Pubkey,
},
RemoveRequiredSignatory,
}
Expand description
Instructions supported by the Governance program
Variants§
CreateRealm
Creates Governance Realm account which aggregates governances for given Community Mint and optional Council Mint
[writable]
Governance Realm account.- PDA seeds:[‘governance’,name]
[]
Realm authority[]
Community Token Mint[writable]
Community Token Holding account.- PDA seeds: [‘governance’,realm,community_mint] The account will be created with the Realm PDA as its owner
[signer]
Payer[]
System[]
SPL Token[]
Sysvar Rent[]
Council Token Mint - optional[writable]
Council Token Holding account - optional unless council is used.- PDA seeds: [‘governance’,realm,council_mint] The account will be created with the Realm PDA as its owner
[writable]
RealmConfig account.- PDA seeds: [‘realm-config’, realm]
[]
Optional Community Voter Weight Addin Program Id[]
Optional Max Community Voter Weight Addin Program Id[]
Optional Council Voter Weight Addin Program Id[]
Optional Max Council Voter Weight Addin Program Id
Fields
config_args: RealmConfigArgs
Realm config args
DepositGoverningTokens
Deposits governing tokens (Community or Council) to Governance Realm and establishes your voter weight to be used for voting within the Realm Note: If subsequent (top up) deposit is made and there are active votes for the Voter then the vote weights won’t be updated automatically It can be done by relinquishing votes on active Proposals and voting again with the new weight
[]
Realm account[writable]
Governing Token Holding account.- PDA seeds: [‘governance’,realm, governing_token_mint]
[writable]
Governing Token Source account. It can be either spl-token TokenAccount or MintAccount Tokens will be transferred or minted to the Holding account[signer]
Governing Token Owner account[signer]
Governing Token Source account authority It should be owner for TokenAccount and mint_authority for MintAccount[writable]
TokenOwnerRecord account.- PDA seeds: [‘governance’,realm, governing_token_mint, governing_token_owner]
[signer]
Payer[]
System[]
SPL Token program[]
RealmConfig account.- PDA seeds: [‘realm-config’, realm]
WithdrawGoverningTokens
Withdraws governing tokens (Community or Council) from Governance Realm and downgrades your voter weight within the Realm. Note: It’s only possible to withdraw tokens if the Voter doesn’t have any outstanding active votes. If there are any outstanding votes then they must be relinquished before tokens could be withdrawn
[]
Realm account[writable]
Governing Token Holding account.- PDA seeds: [‘governance’,realm, governing_token_mint]
[writable]
Governing Token Destination account. All tokens will be transferred to this account[signer]
Governing Token Owner account[writable]
TokenOwnerRecord account.- PDA seeds: [‘governance’,realm, governing_token_mint, governing_token_owner]
[]
SPL Token program[]
RealmConfig account.- PDA seeds: [‘realm-config’, realm]
SetGovernanceDelegate
Sets Governance Delegate for the given Realm and Governing Token Mint (Community or Council). The Delegate would have voting rights and could vote on behalf of the Governing Token Owner. The Delegate would also be able to create Proposals on behalf of the Governing Token Owner. Note: This doesn’t take voting rights from the Token Owner who still can vote and change governance_delegate
[signer]
Current Governance Delegate or Governing Token owner[writable]
Token Owner Record
CreateGovernance
Creates Governance account which can be used to govern any arbitrary Solana account or asset
[]
Realm account the created Governance belongs to[writable]
Account Governance account. * PDA seeds: [‘account-governance’, realm, governed_account][]
Account governed by this Governance Note: The account doesn’t have to exist and can be only used as a unique identifier for the Governance account[]
Governing TokenOwnerRecord account (Used only if not signed by RealmAuthority)[signer]
Payer[]
System program[signer]
Governance authority[]
RealmConfig account. * PDA seeds: [‘realm-config’, realm][]
Optional Voter Weight Record
Fields
config: GovernanceConfig
Governance config
CreateProgramGovernance
Creates Program Governance account which governs an upgradable program
[]
Realm account the created Governance belongs to[writable]
Program Governance account. * PDA seeds: [‘program-governance’, realm, governed_program][]
Program governed by this Governance account[writable]
Program Data account of the Program governed by this Governance account[signer]
Current Upgrade Authority account of the Program governed by this Governance account[]
Governing TokenOwnerRecord account (Used only if not signed by RealmAuthority)[signer]
Payer[]
bpf_upgradeable_loader program[]
System program[signer]
Governance authority[]
RealmConfig account. * PDA seeds: [‘realm-config’, realm][]
Optional Voter Weight Record
Fields
config: GovernanceConfig
Governance config
Indicates whether Program’s upgrade_authority should be transferred to the Governance PDA If it’s set to false then it can be done at a later time However the instruction would validate the current upgrade_authority signed the transaction nonetheless
CreateProposal
Creates Proposal account for Transactions which will be executed at some point in the future
[]
Realm account the created Proposal belongs to[writable]
Proposal account. * PDA seeds [‘governance’,governance, governing_token_mint, proposal_seed][writable]
Governance account[writable]
TokenOwnerRecord account of the Proposal owner[]
Governing Token Mint the Proposal is created for[signer]
Governance Authority (Token Owner or Governance Delegate)[signer]
Payer[]
System program[]
RealmConfig account. * PDA seeds: [‘realm-config’, realm][]
Optional Voter Weight Record 10.[writable]
Optional ProposalDeposit account. * PDA seeds: [‘proposal-deposit’, proposal, deposit payer] Proposal deposit is required when there are more active proposals than the configured deposit exempt amount. The deposit is paid by the Payer of the transaction and can be reclaimed using RefundProposalDeposit once the Proposal is no longer active.
Fields
AddSignatory
Adds a signatory to the Proposal which means this Proposal can’t leave Draft state until yet another Signatory signs
[]
Governance account[writable]
Proposal account associated with the governance[writable]
Signatory Record Account[signer]
Payer[]
System program Either:-
[]
TokenOwnerRecord account of the Proposal owner[signer]
Governance Authority (Token Owner or Governance Delegate)
-
[]
RequiredSignatory account associated with the governance.
-
Legacy1
Formerly RemoveSignatory. Exists for backwards-compatibility.
InsertTransaction
Inserts Transaction with a set of instructions for the Proposal at the
given index position New Transaction must be inserted at the end of
the range indicated by Proposal transactions_next_index
If a Transaction replaces an existing Transaction at a given index then
the old one must be removed using RemoveTransaction first
0. []
Governance account
[writable]
Proposal account[]
TokenOwnerRecord account of the Proposal owner[signer]
Governance Authority (Token Owner or Governance Delegate)[writable]
ProposalTransaction, account. * PDA seeds: [‘governance’, proposal, option_index, index][signer]
Payer[]
System program[]
Rent sysvar
Fields
hold_up_time: u32
Waiting time (in seconds) between vote period ending and this being eligible for execution
instructions: Vec<InstructionData>
Instructions Data
RemoveTransaction
Removes Transaction from the Proposal
[writable]
Proposal account[]
TokenOwnerRecord account of the Proposal owner[signer]
Governance Authority (Token Owner or Governance Delegate)[writable]
ProposalTransaction, account[writable]
Beneficiary Account which would receive lamports from the disposed ProposalTransaction account
CancelProposal
Cancels Proposal by changing its state to Canceled
[]
Realm account[writable]
Governance account[writable]
Proposal account[writable]
TokenOwnerRecord account of the Proposal owner[signer]
Governance Authority (Token Owner or Governance Delegate)
SignOffProposal
Signs off Proposal indicating the Signatory approves the Proposal When the last Signatory signs off the Proposal it enters Voting state Note: Adding signatories to a Proposal is a quality and not a security gate and it’s entirely at the discretion of the Proposal owner If Proposal owner doesn’t designate any signatories then can sign off the Proposal themself
[]
Realm account[]
Governance account[writable]
Proposal account[signer]
Signatory account signing off the Proposal Or Proposal owner if the owner hasn’t appointed any signatories[]
TokenOwnerRecord for the Proposal owner, required when the owner signs off the Proposal Or[writable]
SignatoryRecord account, required when non owner sings off the Proposal
CastVote
Uses your voter weight (deposited Community or Council tokens) to cast a vote on a Proposal By doing so you indicate you approve or disapprove of running the Proposal set of transactions If you tip the consensus then the transactions can begin to be run after their hold up time
[]
Realm account[writable]
Governance account[writable]
Proposal account[writable]
TokenOwnerRecord of the Proposal owner[writable]
TokenOwnerRecord of the voter. * PDA seeds: [‘governance’,realm, vote_governing_token_mint, governing_token_owner][signer]
Governance Authority (Token Owner or Governance Delegate)[writable]
Proposal VoteRecord account. * PDA seeds: [‘governance’,proposal,token_owner_record][]
The Governing Token Mint which is used to cast the vote (vote_governing_token_mint). The voting token mint is the governing_token_mint of the Proposal for Approve, Deny and Abstain votes. For Veto vote the voting token mint is the mint of the opposite voting population Council mint to veto Community proposals and Community mint to veto Council proposals. Note: In the current version only Council veto is supported[signer]
Payer[]
System program[]
RealmConfig account. * PDA seeds: [‘realm-config’, realm][]
Optional Voter Weight Record[]
Optional Max Voter Weight Record
FinalizeVote
Finalizes vote in case the Vote was not automatically tipped within max_voting_time period
[]
Realm account[writable]
Governance account[writable]
Proposal account[writable]
TokenOwnerRecord of the Proposal owner[]
Governing Token Mint[]
RealmConfig account. * PDA seeds: [‘realm-config’, realm][]
Optional Max Voter Weight Record
RelinquishVote
Relinquish Vote removes voter weight from a Proposal and removes it from voter’s active votes. If the Proposal is still being voted on then the voter’s weight won’t count towards the vote outcome. If the Proposal is already in decided state then the instruction has no impact on the Proposal and only allows voters to prune their outstanding votes in case they wanted to withdraw Governing tokens from the Realm
[]
Realm account[]
Governance account[writable]
Proposal account[writable]
TokenOwnerRecord account. * PDA seeds: [‘governance’,realm, vote_governing_token_mint, governing_token_owner][writable]
Proposal VoteRecord account. * PDA seeds: [‘governance’,proposal, token_owner_record][]
The Governing Token Mint which was used to cast the vote (vote_governing_token_mint)[signer]
Optional Governance Authority (Token Owner or Governance Delegate) It’s required only when Proposal is still being voted on[writable]
Optional Beneficiary account which would receive lamports when VoteRecord Account is disposed It’s required only when Proposal is still being voted on
ExecuteTransaction
Executes a Transaction in the Proposal Anybody can execute transaction once Proposal has been voted Yes and transaction_hold_up time has passed The actual transaction being executed will be signed by Governance PDA the Proposal belongs to For example to execute Program upgrade the ProgramGovernance PDA would be used as the signer
[]
Governance account[writable]
Proposal account[writable]
ProposalTransaction account you wish to execute 3+ Any extra accounts that are part of the transaction, in order
CreateMintGovernance
Creates Mint Governance account which governs a mint
[]
Realm account the created Governance belongs to[writable]
Mint Governance account. * PDA seeds: [‘mint-governance’, realm, governed_mint][writable]
Mint governed by this Governance account[signer]
Current Mint authority (MintTokens and optionally FreezeAccount)[]
Governing TokenOwnerRecord account (Used only if not signed by RealmAuthority)[signer]
Payer[]
SPL Token program[]
System program[signer]
Governance authority[]
RealmConfig account. * PDA seeds: [‘realm-config’, realm][]
Optional Voter Weight Record
Fields
config: GovernanceConfig
Governance config
Indicates whether Mint’s authorities (MintTokens, FreezeAccount) should be transferred to the Governance PDA. If it’s set to false then it can be done at a later time. However the instruction would validate the current mint authority signed the transaction nonetheless
CreateTokenGovernance
Creates Token Governance account which governs a token account
[]
Realm account the created Governance belongs to[writable]
Token Governance account. * PDA seeds: [‘token-governance’, realm, governed_token][writable]
Token account governed by this Governance account[signer]
Current token account authority (AccountOwner and optionally CloseAccount)[]
Governing TokenOwnerRecord account (Used only if not signed by RealmAuthority)[signer]
Payer[]
SPL Token program[]
System program[signer]
Governance authority[]
RealmConfig account. * PDA seeds: [‘realm-config’, realm][]
Optional Voter Weight Record
Fields
config: GovernanceConfig
Governance config
Indicates whether the token account authorities (AccountOwner and optionally CloseAccount) should be transferred to the Governance PDA If it’s set to false then it can be done at a later time However the instruction would validate the current token owner signed the transaction nonetheless
SetGovernanceConfig
Sets GovernanceConfig for a Governance
[]
Realm account the Governance account belongs to[writable, signer]
The Governance account the config is for
Fields
config: GovernanceConfig
New governance config
FlagTransactionError
Flags a transaction and its parent Proposal with error status It can be used by Proposal owner in case the transaction is permanently broken and can’t be executed. Note: This instruction is a workaround because currently it’s not possible to catch errors from CPI calls and the Governance program has no way to know when instruction failed and flag it automatically.
[writable]
Proposal account[]
TokenOwnerRecord account of the Proposal owner[signer]
Governance Authority (Token Owner or Governance Delegate)[writable]
ProposalTransaction account to flag
SetRealmAuthority
Sets new Realm authority
[writable]
Realm account[signer]
Current Realm authority[]
New realm authority. Must be one of the realm governances when set
Fields
action: SetRealmAuthorityAction
Set action ( SetUnchecked, SetChecked, Remove)
SetRealmConfig
Sets realm config
0. [writable]
Realm account
[signer]
Realm authority[]
Council Token Mint - optional Note: In the current version it’s only possible to remove council mint (set it to None). After setting council to None it won’t be possible to withdraw the tokens from the Realm any longer. If that’s required then it must be done before executing this instruction.[writable]
Council Token Holding account - optional unless council is used. * PDA seeds: [‘governance’,realm,council_mint] The account will be created with the Realm PDA as its owner[]
System[writable]
RealmConfig account. * PDA seeds: [‘realm-config’, realm][]
Optional Community Voter Weight Addin Program Id[]
Optional Max Community Voter Weight Addin Program Id[]
Optional Council Voter Weight Addin Program Id[]
Optional Max Council Voter Weight Addin Program Id[signer]
Optional Payer. Required if RealmConfig doesn’t exist and needs to be created
Fields
config_args: RealmConfigArgs
Realm config args
CreateTokenOwnerRecord
Creates TokenOwnerRecord with 0 deposit amount It’s used to register TokenOwner when voter weight addin is used and the Governance program doesn’t take deposits
[]
Realm account[]
Governing Token Owner account[writable]
TokenOwnerRecord account. * PDA seeds: [‘governance’,realm, governing_token_mint, governing_token_owner][]
Governing Token Mint[signer]
Payer[]
System
UpdateProgramMetadata
Updates ProgramMetadata account The instruction dumps information implied by the program’s code into a persistent account
[writable]
ProgramMetadata account.- PDA seeds: [‘metadata’]
[signer]
Payer[]
System
CreateNativeTreasury
Creates native SOL treasury account for a Governance account The account has no data and can be used as a payer for instructions signed by Governance PDAs or as a native SOL treasury
[]
Governance account the treasury account is for[writable]
NativeTreasury account.- PDA seeds: [‘native-treasury’, governance]
[signer]
Payer[]
System
RevokeGoverningTokens
Revokes (burns) membership governing tokens for the given TokenOwnerRecord and hence takes away governance power from the TokenOwner. Note: If there are active votes for the TokenOwner then the vote weights won’t be updated automatically
[]
Realm account[writable]
Governing Token Holding account.- PDA seeds: [‘governance’,realm, governing_token_mint]
[writable]
TokenOwnerRecord account.- PDA seeds: [‘governance’,realm, governing_token_mint, governing_token_owner]
[writable]
GoverningTokenMint[signer]
Revoke authority which can be either of: 1) GoverningTokenMint mint_authority to forcefully revoke the membership tokens 2) GoverningTokenOwner who voluntarily revokes their own membership[]
RealmConfig account.- PDA seeds: [‘realm-config’, realm]
[]
SPL Token program
RefundProposalDeposit
Refunds ProposalDeposit once the given proposal is no longer active (Draft, SigningOff, Voting) Once the condition is met the instruction is permissionless and returns the deposit amount to the deposit payer
[]
Proposal account[writable]
ProposalDeposit account. * PDA seeds: [‘proposal-deposit’, proposal, deposit payer][writable]
Proposal deposit payer (beneficiary) account
CompleteProposal
Transitions an off-chain or manually executable Proposal from Succeeded into Completed state
Upon a successful vote on an off-chain or manually executable proposal it remains in Succeeded state Once the external actions are executed the Proposal owner can use the instruction to manually transition it to Completed state
[writable]
Proposal account[]
TokenOwnerRecord account of the Proposal owner[signer]
CompleteProposal authority (Token Owner or Delegate)
AddRequiredSignatory
Adds a required signatory to the Governance, which will be applied to all proposals created with it
[writable, signer]
The Governance account the config is for[writable]
RequiredSignatory Account[signer]
Payer[]
System program
RemoveRequiredSignatory
Removes a required signatory from the Governance
[writable, signer]
The Governance account the config is for[writable]
RequiredSignatory Account[writable]
Beneficiary Account which would receive lamports from the disposed RequiredSignatory Account
Trait Implementations§
Source§impl BorshDeserialize for GovernanceInstructionwhere
String: BorshDeserialize,
RealmConfigArgs: BorshDeserialize,
u64: BorshDeserialize,
Option<Pubkey>: BorshDeserialize,
GovernanceConfig: BorshDeserialize,
bool: BorshDeserialize,
VoteType: BorshDeserialize,
Vec<String>: BorshDeserialize,
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u16: BorshDeserialize,
u32: BorshDeserialize,
Vec<InstructionData>: BorshDeserialize,
Vote: BorshDeserialize,
SetRealmAuthorityAction: BorshDeserialize,
impl BorshDeserialize for GovernanceInstructionwhere
String: BorshDeserialize,
RealmConfigArgs: BorshDeserialize,
u64: BorshDeserialize,
Option<Pubkey>: BorshDeserialize,
GovernanceConfig: BorshDeserialize,
bool: BorshDeserialize,
VoteType: BorshDeserialize,
Vec<String>: BorshDeserialize,
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u16: BorshDeserialize,
u32: BorshDeserialize,
Vec<InstructionData>: BorshDeserialize,
Vote: BorshDeserialize,
SetRealmAuthorityAction: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSchema for GovernanceInstruction
impl BorshSchema for GovernanceInstruction
Source§fn declaration() -> Declaration
fn declaration() -> Declaration
Source§fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>,
)
fn add_definitions_recursively( definitions: &mut HashMap<Declaration, Definition>, )
Source§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition>,
)
fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition>, )
fn schema_container() -> BorshSchemaContainer
Source§impl BorshSerialize for GovernanceInstructionwhere
String: BorshSerialize,
RealmConfigArgs: BorshSerialize,
u64: BorshSerialize,
Option<Pubkey>: BorshSerialize,
GovernanceConfig: BorshSerialize,
bool: BorshSerialize,
VoteType: BorshSerialize,
Vec<String>: BorshSerialize,
Pubkey: BorshSerialize,
u8: BorshSerialize,
u16: BorshSerialize,
u32: BorshSerialize,
Vec<InstructionData>: BorshSerialize,
Vote: BorshSerialize,
SetRealmAuthorityAction: BorshSerialize,
impl BorshSerialize for GovernanceInstructionwhere
String: BorshSerialize,
RealmConfigArgs: BorshSerialize,
u64: BorshSerialize,
Option<Pubkey>: BorshSerialize,
GovernanceConfig: BorshSerialize,
bool: BorshSerialize,
VoteType: BorshSerialize,
Vec<String>: BorshSerialize,
Pubkey: BorshSerialize,
u8: BorshSerialize,
u16: BorshSerialize,
u32: BorshSerialize,
Vec<InstructionData>: BorshSerialize,
Vote: BorshSerialize,
SetRealmAuthorityAction: BorshSerialize,
Source§impl Clone for GovernanceInstruction
impl Clone for GovernanceInstruction
Source§fn clone(&self) -> GovernanceInstruction
fn clone(&self) -> GovernanceInstruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GovernanceInstruction
impl Debug for GovernanceInstruction
Source§impl EnumExt for GovernanceInstructionwhere
String: BorshDeserialize,
RealmConfigArgs: BorshDeserialize,
u64: BorshDeserialize,
Option<Pubkey>: BorshDeserialize,
GovernanceConfig: BorshDeserialize,
bool: BorshDeserialize,
VoteType: BorshDeserialize,
Vec<String>: BorshDeserialize,
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u16: BorshDeserialize,
u32: BorshDeserialize,
Vec<InstructionData>: BorshDeserialize,
Vote: BorshDeserialize,
SetRealmAuthorityAction: BorshDeserialize,
impl EnumExt for GovernanceInstructionwhere
String: BorshDeserialize,
RealmConfigArgs: BorshDeserialize,
u64: BorshDeserialize,
Option<Pubkey>: BorshDeserialize,
GovernanceConfig: BorshDeserialize,
bool: BorshDeserialize,
VoteType: BorshDeserialize,
Vec<String>: BorshDeserialize,
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u16: BorshDeserialize,
u32: BorshDeserialize,
Vec<InstructionData>: BorshDeserialize,
Vote: BorshDeserialize,
SetRealmAuthorityAction: BorshDeserialize,
Source§impl PartialEq for GovernanceInstruction
impl PartialEq for GovernanceInstruction
impl Eq for GovernanceInstruction
impl StructuralPartialEq for GovernanceInstruction
Auto Trait Implementations§
impl Freeze for GovernanceInstruction
impl RefUnwindSafe for GovernanceInstruction
impl Send for GovernanceInstruction
impl Sync for GovernanceInstruction
impl Unpin for GovernanceInstruction
impl UnwindSafe for GovernanceInstruction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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