pub struct Program { /* private fields */ }Expand description
Program is the primary client handle to be used to build and send requests.
Implementations§
source§impl Program
impl Program
pub fn payer(&self) -> Pubkey
sourcepub fn request(&self) -> RequestBuilder<'_>
pub fn request(&self) -> RequestBuilder<'_>
Returns a request builder.
sourcepub fn state_request(&self) -> RequestBuilder<'_>
pub fn state_request(&self) -> RequestBuilder<'_>
Returns a request builder for program state.
sourcepub fn account<T>(&self, address: Pubkey) -> Result<T, ClientError>where
T: AccountDeserialize,
pub fn account<T>(&self, address: Pubkey) -> Result<T, ClientError>where T: AccountDeserialize,
Returns the account at the given address.
sourcepub fn accounts<T>(
&self,
filters: Vec<RpcFilterType, Global>
) -> Result<Vec<(Pubkey, T), Global>, ClientError>where
T: AccountDeserialize + Discriminator,
pub fn accounts<T>( &self, filters: Vec<RpcFilterType, Global> ) -> Result<Vec<(Pubkey, T), Global>, ClientError>where T: AccountDeserialize + Discriminator,
Returns all program accounts of the given type matching the given filters
sourcepub fn accounts_lazy<T>(
&self,
filters: Vec<RpcFilterType, Global>
) -> Result<ProgramAccountsIterator<T>, ClientError>where
T: AccountDeserialize + Discriminator,
pub fn accounts_lazy<T>( &self, filters: Vec<RpcFilterType, Global> ) -> Result<ProgramAccountsIterator<T>, ClientError>where T: AccountDeserialize + Discriminator,
Returns all program accounts of the given type matching the given filters as an iterator Deserialization is executed lazily