Struct crm_cli_utils::client::Client
source · pub struct Client {
pub config_path: String,
pub config: Config,
pub rpc_timeout: Duration,
pub commitment: CommitmentConfig,
pub confirm_transaction_initial_timeout: Duration,
pub payer: Rc<dyn Signer>,
}Fields
config_path: Stringconfig: Configrpc_timeout: Durationcommitment: CommitmentConfigconfirm_transaction_initial_timeout: Durationpayer: Rc<dyn Signer>Implementations
sourceimpl Client
impl Client
pub fn new(config_path: String) -> Result<Self, Error>
pub fn rpc_client(&self) -> RpcClient
pub fn payer_key(&self) -> Pubkey
sourcepub fn account<T: AccountDeserialize>(
&self,
address: Pubkey
) -> Result<T, ClientError>
pub fn account<T: AccountDeserialize>(
&self,
address: Pubkey
) -> Result<T, ClientError>
Returns the account at the given address.
sourcepub fn accounts<T: AccountDeserialize + Discriminator>(
&self,
program_id: &Pubkey,
filters: Vec<RpcFilterType>
) -> Result<Vec<(Pubkey, T)>, ClientError>
pub fn accounts<T: AccountDeserialize + Discriminator>(
&self,
program_id: &Pubkey,
filters: Vec<RpcFilterType>
) -> Result<Vec<(Pubkey, T)>, ClientError>
Returns all program accounts of the given type matching the given filters
sourcepub fn accounts_lazy<T: AccountDeserialize + Discriminator>(
&self,
program_id: &Pubkey,
filters: Vec<RpcFilterType>
) -> Result<ProgramAccountsIterator<T>, ClientError>
pub fn accounts_lazy<T: AccountDeserialize + Discriminator>(
&self,
program_id: &Pubkey,
filters: Vec<RpcFilterType>
) -> Result<ProgramAccountsIterator<T>, ClientError>
Returns all program accounts of the given type matching the given filters as an iterator Deserialization is executed lazily
pub fn send_and_confirm(&self, ixs: &[Instruction])
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more