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

Fields

§name: String

UTF-8 encoded Governance Realm name

§config_args: RealmConfigArgs

Realm config args

Creates Governance Realm account which aggregates governances for given Community Mint and optional Council Mint

  1. [writable] Governance Realm account.
    • PDA seeds:[‘governance’,name]
  2. [] Realm authority
  3. [] Community Token Mint
  4. [writable] Community Token Holding account.
    • PDA seeds: [‘governance’,realm,community_mint] The account will be created with the Realm PDA as its owner
  5. [signer] Payer
  6. [] System
  7. [] SPL Token
  8. [] Sysvar Rent
  9. [] Council Token Mint - optional
  10. [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
  11. [writable] RealmConfig account.
    • PDA seeds: [‘realm-config’, realm]
  12. [] Optional Community Voter Weight Addin Program Id
  13. [] Optional Max Community Voter Weight Addin Program Id
  14. [] Optional Council Voter Weight Addin Program Id
  15. [] Optional Max Council Voter Weight Addin Program Id
§

DepositGoverningTokens

Fields

§amount: u64

The amount to deposit into the realm

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

  1. [] Realm account
  2. [writable] Governing Token Holding account.
    • PDA seeds: [‘governance’,realm, governing_token_mint]
  3. [writable] Governing Token Source account. It can be either spl-token TokenAccount or MintAccount Tokens will be transferred or minted to the Holding account
  4. [signer] Governing Token Owner account
  5. [signer] Governing Token Source account authority It should be owner for TokenAccount and mint_authority for MintAccount
  6. [writable] TokenOwnerRecord account.
    • PDA seeds: [‘governance’,realm, governing_token_mint, governing_token_owner]
  7. [signer] Payer
  8. [] System
  9. [] SPL Token program
  10. [] 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

  1. [] Realm account
  2. [writable] Governing Token Holding account.
    • PDA seeds: [‘governance’,realm, governing_token_mint]
  3. [writable] Governing Token Destination account. All tokens will be transferred to this account
  4. [signer] Governing Token Owner account
  5. [writable] TokenOwnerRecord account.
    • PDA seeds: [‘governance’,realm, governing_token_mint, governing_token_owner]
  6. [] SPL Token program
  7. [] RealmConfig account.
    • PDA seeds: [‘realm-config’, realm]
§

SetGovernanceDelegate

Fields

§new_governance_delegate: Option<Pubkey>

New Governance Delegate

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

  1. [signer] Current Governance Delegate or Governing Token owner
  2. [writable] Token Owner Record
§

CreateGovernance

Fields

§config: GovernanceConfig

Governance config

Creates Governance account which can be used to govern any arbitrary Solana account or asset

  1. [] Realm account the created Governance belongs to
  2. [writable] Account Governance account. * PDA seeds: [‘account-governance’, realm, governed_account]
  3. [] 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
  4. [] Governing TokenOwnerRecord account (Used only if not signed by RealmAuthority)
  5. [signer] Payer
  6. [] System program
  7. [signer] Governance authority
  8. [] RealmConfig account. * PDA seeds: [‘realm-config’, realm]
  9. [] Optional Voter Weight Record
§

CreateProgramGovernance

Fields

§config: GovernanceConfig

Governance config

§transfer_upgrade_authority: bool

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

Creates Program Governance account which governs an upgradable program

  1. [] Realm account the created Governance belongs to
  2. [writable] Program Governance account. * PDA seeds: [‘program-governance’, realm, governed_program]
  3. [] Program governed by this Governance account
  4. [writable] Program Data account of the Program governed by this Governance account
  5. [signer] Current Upgrade Authority account of the Program governed by this Governance account
  6. [] Governing TokenOwnerRecord account (Used only if not signed by RealmAuthority)
  7. [signer] Payer
  8. [] bpf_upgradeable_loader program
  9. [] System program
  10. [signer] Governance authority
  11. [] RealmConfig account. * PDA seeds: [‘realm-config’, realm]
  12. [] Optional Voter Weight Record
§

CreateProposal

Fields

§name: String

UTF-8 encoded name of the proposal

§description_link: String

Link to a gist explaining the proposal

§vote_type: VoteType

Proposal vote type

§options: Vec<String>

Proposal options

§use_deny_option: bool

Indicates whether the proposal has the deny option A proposal without the rejecting option is a non binding survey Only proposals with the rejecting option can have executable transactions

§proposal_seed: Pubkey

Unique seed for the Proposal PDA

Creates Proposal account for Transactions which will be executed at some point in the future

  1. [] Realm account the created Proposal belongs to
  2. [writable] Proposal account. * PDA seeds [‘governance’,governance, governing_token_mint, proposal_seed]
  3. [writable] Governance account
  4. [writable] TokenOwnerRecord account of the Proposal owner
  5. [] Governing Token Mint the Proposal is created for
  6. [signer] Governance Authority (Token Owner or Governance Delegate)
  7. [signer] Payer
  8. [] System program
  9. [] RealmConfig account. * PDA seeds: [‘realm-config’, realm]
  10. [] 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.
§

AddSignatory

Fields

§signatory: Pubkey

Signatory to add to the Proposal

Adds a signatory to the Proposal which means this Proposal can’t leave Draft state until yet another Signatory signs

  1. [] Governance account
  2. [writable] Proposal account associated with the governance
  3. [writable] Signatory Record Account
  4. [signer] Payer
  5. [] System program Either:
      1. [] TokenOwnerRecord account of the Proposal owner
      2. [signer] Governance Authority (Token Owner or Governance Delegate)
      1. [] RequiredSignatory account associated with the governance.
§

Legacy1

Formerly RemoveSignatory. Exists for backwards-compatibility.

§

InsertTransaction

Fields

§option_index: u8

The index of the option the transaction is for

§index: u16

Transaction index to be inserted at.

§hold_up_time: u32

Waiting time (in seconds) between vote period ending and this being eligible for execution

§instructions: Vec<InstructionData>

Instructions Data

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

  1. [writable] Proposal account
  2. [] TokenOwnerRecord account of the Proposal owner
  3. [signer] Governance Authority (Token Owner or Governance Delegate)
  4. [writable] ProposalTransaction, account. * PDA seeds: [‘governance’, proposal, option_index, index]
  5. [signer] Payer
  6. [] System program
  7. [] Rent sysvar
§

RemoveTransaction

Removes Transaction from the Proposal

  1. [writable] Proposal account
  2. [] TokenOwnerRecord account of the Proposal owner
  3. [signer] Governance Authority (Token Owner or Governance Delegate)
  4. [writable] ProposalTransaction, account
  5. [writable] Beneficiary Account which would receive lamports from the disposed ProposalTransaction account
§

CancelProposal

Cancels Proposal by changing its state to Canceled

  1. [] Realm account
  2. [writable] Governance account
  3. [writable] Proposal account
  4. [writable] TokenOwnerRecord account of the Proposal owner
  5. [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

  1. [] Realm account
  2. [] Governance account
  3. [writable] Proposal account
  4. [signer] Signatory account signing off the Proposal Or Proposal owner if the owner hasn’t appointed any signatories
  5. [] 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

Fields

§vote: Vote

User’s vote

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

  1. [] Realm account
  2. [writable] Governance account
  3. [writable] Proposal account
  4. [writable] TokenOwnerRecord of the Proposal owner
  5. [writable] TokenOwnerRecord of the voter. * PDA seeds: [‘governance’,realm, vote_governing_token_mint, governing_token_owner]
  6. [signer] Governance Authority (Token Owner or Governance Delegate)
  7. [writable] Proposal VoteRecord account. * PDA seeds: [‘governance’,proposal,token_owner_record]
  8. [] 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
  9. [signer] Payer
  10. [] System program
  11. [] RealmConfig account. * PDA seeds: [‘realm-config’, realm]
  12. [] Optional Voter Weight Record
  13. [] Optional Max Voter Weight Record
§

FinalizeVote

Finalizes vote in case the Vote was not automatically tipped within max_voting_time period

  1. [] Realm account
  2. [writable] Governance account
  3. [writable] Proposal account
  4. [writable] TokenOwnerRecord of the Proposal owner
  5. [] Governing Token Mint
  6. [] RealmConfig account. * PDA seeds: [‘realm-config’, realm]
  7. [] 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

  1. [] Realm account
  2. [] Governance account
  3. [writable] Proposal account
  4. [writable] TokenOwnerRecord account. * PDA seeds: [‘governance’,realm, vote_governing_token_mint, governing_token_owner]
  5. [writable] Proposal VoteRecord account. * PDA seeds: [‘governance’,proposal, token_owner_record]
  6. [] The Governing Token Mint which was used to cast the vote (vote_governing_token_mint)
  7. [signer] Optional Governance Authority (Token Owner or Governance Delegate) It’s required only when Proposal is still being voted on
  8. [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

  1. [] Governance account
  2. [writable] Proposal account
  3. [writable] ProposalTransaction account you wish to execute 3+ Any extra accounts that are part of the transaction, in order
§

CreateMintGovernance

Fields

§config: GovernanceConfig

Governance config

§transfer_mint_authorities: bool

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

Creates Mint Governance account which governs a mint

  1. [] Realm account the created Governance belongs to
  2. [writable] Mint Governance account. * PDA seeds: [‘mint-governance’, realm, governed_mint]
  3. [writable] Mint governed by this Governance account
  4. [signer] Current Mint authority (MintTokens and optionally FreezeAccount)
  5. [] Governing TokenOwnerRecord account (Used only if not signed by RealmAuthority)
  6. [signer] Payer
  7. [] SPL Token program
  8. [] System program
  9. [signer] Governance authority
  10. [] RealmConfig account. * PDA seeds: [‘realm-config’, realm]
  11. [] Optional Voter Weight Record
§

CreateTokenGovernance

Fields

§config: GovernanceConfig

Governance config

§transfer_account_authorities: bool

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

Creates Token Governance account which governs a token account

  1. [] Realm account the created Governance belongs to
  2. [writable] Token Governance account. * PDA seeds: [‘token-governance’, realm, governed_token]
  3. [writable] Token account governed by this Governance account
  4. [signer] Current token account authority (AccountOwner and optionally CloseAccount)
  5. [] Governing TokenOwnerRecord account (Used only if not signed by RealmAuthority)
  6. [signer] Payer
  7. [] SPL Token program
  8. [] System program
  9. [signer] Governance authority
  10. [] RealmConfig account. * PDA seeds: [‘realm-config’, realm]
  11. [] Optional Voter Weight Record
§

SetGovernanceConfig

Fields

§config: GovernanceConfig

New governance config

Sets GovernanceConfig for a Governance

  1. [] Realm account the Governance account belongs to
  2. [writable, signer] The Governance account the config is for
§

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.

  1. [writable] Proposal account
  2. [] TokenOwnerRecord account of the Proposal owner
  3. [signer] Governance Authority (Token Owner or Governance Delegate)
  4. [writable] ProposalTransaction account to flag
§

SetRealmAuthority

Fields

§action: SetRealmAuthorityAction

Set action ( SetUnchecked, SetChecked, Remove)

Sets new Realm authority

  1. [writable] Realm account
  2. [signer] Current Realm authority
  3. [] New realm authority. Must be one of the realm governances when set
§

SetRealmConfig

Fields

§config_args: RealmConfigArgs

Realm config args

Sets realm config 0. [writable] Realm account

  1. [signer] Realm authority
  2. [] 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.
  3. [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
  4. [] System
  5. [writable] RealmConfig account. * PDA seeds: [‘realm-config’, realm]
  6. [] Optional Community Voter Weight Addin Program Id
  7. [] Optional Max Community Voter Weight Addin Program Id
  8. [] Optional Council Voter Weight Addin Program Id
  9. [] Optional Max Council Voter Weight Addin Program Id
  10. [signer] Optional Payer. Required if RealmConfig doesn’t exist and needs to be created
§

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

  1. [] Realm account
  2. [] Governing Token Owner account
  3. [writable] TokenOwnerRecord account. * PDA seeds: [‘governance’,realm, governing_token_mint, governing_token_owner]
  4. [] Governing Token Mint
  5. [signer] Payer
  6. [] System
§

UpdateProgramMetadata

Updates ProgramMetadata account The instruction dumps information implied by the program’s code into a persistent account

  1. [writable] ProgramMetadata account.
    • PDA seeds: [‘metadata’]
  2. [signer] Payer
  3. [] 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

  1. [] Governance account the treasury account is for
  2. [writable] NativeTreasury account.
    • PDA seeds: [‘native-treasury’, governance]
  3. [signer] Payer
  4. [] System
§

RevokeGoverningTokens

Fields

§amount: u64

The amount to revoke

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

  1. [] Realm account
  2. [writable] Governing Token Holding account.
    • PDA seeds: [‘governance’,realm, governing_token_mint]
  3. [writable] TokenOwnerRecord account.
    • PDA seeds: [‘governance’,realm, governing_token_mint, governing_token_owner]
  4. [writable] GoverningTokenMint
  5. [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
  6. [] RealmConfig account.
    • PDA seeds: [‘realm-config’, realm]
  7. [] 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

  1. [] Proposal account
  2. [writable] ProposalDeposit account. * PDA seeds: [‘proposal-deposit’, proposal, deposit payer]
  3. [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

  1. [writable] Proposal account
  2. [] TokenOwnerRecord account of the Proposal owner
  3. [signer] CompleteProposal authority (Token Owner or Delegate)
§

AddRequiredSignatory

Fields

§signatory: Pubkey

Required signatory to add to the Governance

Adds a required signatory to the Governance, which will be applied to all proposals created with it

  1. [writable, signer] The Governance account the config is for
  2. [writable] RequiredSignatory Account
  3. [signer] Payer
  4. [] System program
§

RemoveRequiredSignatory

Removes a required signatory from the Governance

  1. [writable, signer] The Governance account the config is for
  2. [writable] RequiredSignatory Account
  3. [writable] Beneficiary Account which would receive lamports from the disposed RequiredSignatory Account

Trait Implementations§

source§

impl BorshDeserialize for GovernanceInstruction

source§

fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>

source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
source§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

source§

impl BorshSchema for GovernanceInstruction

source§

fn declaration() -> Declaration

Get the name of the type without brackets.
source§

fn add_definitions_recursively( definitions: &mut HashMap<Declaration, Definition> )

Recursively, using DFS, add type definitions required for this type. For primitive types this is an empty map. Type definition explains how to serialize/deserialize a type.
source§

fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition> )

Helper method to add a single type definition to the map.
source§

fn schema_container() -> BorshSchemaContainer

source§

impl BorshSerialize for GovernanceInstruction

source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

source§

fn try_to_vec(&self) -> Result<Vec<u8>, Error>

Serialize this instance into a vector of bytes.
source§

impl Clone for GovernanceInstruction

source§

fn clone(&self) -> GovernanceInstruction

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for GovernanceInstruction

source§

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

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

impl EnumExt for GovernanceInstruction

source§

fn deserialize_variant<R: Read>( reader: &mut R, variant_idx: u8 ) -> Result<Self, Error>

Deserialises given variant of an enum from the reader. Read more
source§

impl PartialEq for GovernanceInstruction

source§

fn eq(&self, other: &GovernanceInstruction) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for GovernanceInstruction

source§

impl StructuralEq for GovernanceInstruction

source§

impl StructuralPartialEq for GovernanceInstruction

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> AbiExample for T

§

default fn example() -> T

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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.

§

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

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V