pub struct AllocationsClient { /* private fields */ }Expand description
Client for allocations operations.
Implementations§
Source§impl AllocationsClient
impl AllocationsClient
pub fn new(client: Client) -> Self
Sourcepub async fn list_allocations(
&self,
query: Option<ListAllocationsQuery>,
) -> Result<ListAllocationsResponse, Error>
pub async fn list_allocations( &self, query: Option<ListAllocationsQuery>, ) -> Result<ListAllocationsResponse, Error>
Lists the allocations of your organization.
Sourcepub async fn create_allocation(
&self,
body: CreateAllocationRequest,
) -> Result<CreateAllocationResponse, Error>
pub async fn create_allocation( &self, body: CreateAllocationRequest, ) -> Result<CreateAllocationResponse, Error>
Create a new allocation.
An allocation deposits assets from one of your wallets into a rewards-earning protocol. Two providers are available:
Sourcepub async fn list_allocation_actions(
&self,
allocation_id: String,
query: Option<ListAllocationActionsQuery>,
) -> Result<ListAllocationActionsResponse, Error>
pub async fn list_allocation_actions( &self, allocation_id: String, query: Option<ListAllocationActionsQuery>, ) -> Result<ListAllocationActionsResponse, Error>
Retrieve the list of actions for a specific allocation.
Sourcepub async fn create_allocation_action(
&self,
allocation_id: String,
body: CreateAllocationActionRequest,
) -> Result<CreateAllocationActionResponse, Error>
pub async fn create_allocation_action( &self, allocation_id: String, body: CreateAllocationActionRequest, ) -> Result<CreateAllocationActionResponse, Error>
Create a new action for an existing allocation.
Sourcepub async fn get_allocation(
&self,
allocation_id: String,
) -> Result<GetAllocationResponse, Error>
pub async fn get_allocation( &self, allocation_id: String, ) -> Result<GetAllocationResponse, Error>
Retrieve the details of a specific allocation.
Sourcepub async fn get_allocations_info(
&self,
) -> Result<GetAllocationsInfoResponse, Error>
pub async fn get_allocations_info( &self, ) -> Result<GetAllocationsInfoResponse, Error>
Retrieve the current reward rate (APY) for each supported allocation protocol.
Trait Implementations§
Source§impl Clone for AllocationsClient
impl Clone for AllocationsClient
Source§fn clone(&self) -> AllocationsClient
fn clone(&self) -> AllocationsClient
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for AllocationsClient
impl !UnwindSafe for AllocationsClient
impl Freeze for AllocationsClient
impl Send for AllocationsClient
impl Sync for AllocationsClient
impl Unpin for AllocationsClient
impl UnsafeUnpin for AllocationsClient
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