pub enum AccountAddress {
Pubkey(String),
Pda {
program_id: String,
seeds: Vec<PdaSeed>,
},
}Expand description
Defines how an account address should be determined Defines how an account address should be determined
Variants§
Pubkey(String)
A specific public key A specific public key
Pda
A Program Derived Address with seeds A Program Derived Address with seeds
Implementations§
Source§impl AccountAddress
impl AccountAddress
Sourcepub fn resolve(&self, values: Option<&HashMap<String, Value>>) -> Option<Pubkey>
pub fn resolve(&self, values: Option<&HashMap<String, Value>>) -> Option<Pubkey>
Resolve the account address to a Pubkey For PDA addresses, this derives the address from the program_id and seeds For PropertyRef seeds, values map is used to resolve the reference
Sourcepub fn resolve_simple(&self) -> Option<Pubkey>
pub fn resolve_simple(&self) -> Option<Pubkey>
Resolve the account address to a Pubkey without any values for PropertyRef This is a convenience method when no PropertyRef seeds are expected
Sourcepub fn get_pda_seed_references(&self) -> Vec<String>
pub fn get_pda_seed_references(&self) -> Vec<String>
Get the names of values that are referenced by PDA seeds These should be filtered out when applying account data overrides since they’re only used for address derivation, not account data modification
Trait Implementations§
Source§impl Clone for AccountAddress
impl Clone for AccountAddress
Source§fn clone(&self) -> AccountAddress
fn clone(&self) -> AccountAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AccountAddress
impl Debug for AccountAddress
Source§impl<'de> Deserialize<'de> for AccountAddress
impl<'de> Deserialize<'de> for AccountAddress
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 From<YamlAccountAddress> for AccountAddress
impl From<YamlAccountAddress> for AccountAddress
Source§fn from(yaml: YamlAccountAddress) -> Self
fn from(yaml: YamlAccountAddress) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for AccountAddress
impl JsonSchema for AccountAddress
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AccountAddress
impl PartialEq for AccountAddress
Source§impl Serialize for AccountAddress
impl Serialize for AccountAddress
impl StructuralPartialEq for AccountAddress
Auto Trait Implementations§
impl Freeze for AccountAddress
impl RefUnwindSafe for AccountAddress
impl Send for AccountAddress
impl Sync for AccountAddress
impl Unpin for AccountAddress
impl UnsafeUnpin for AccountAddress
impl UnwindSafe for AccountAddress
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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