pub struct SupabaseClient { /* private fields */ }Implementations§
Source§impl SupabaseClient
impl SupabaseClient
pub fn new(url: &str, anon_key: &str, service_role_key: &str) -> Self
pub async fn get_invoice( &self, invoice_id: &str, use_service_role: bool, ) -> Result<Option<(Invoice, Vec<PaymentOption>)>>
pub async fn create_invoice( &self, amount: i64, currency: &str, account_id: i64, webhook_url: Option<String>, redirect_url: Option<String>, memo: Option<String>, ) -> Result<Value>
pub async fn list_prices(&self) -> Result<Vec<Price>>
pub async fn get_account(&self, account_id: i64) -> Result<Account>
pub async fn list_available_addresses( &self, account: &Account, ) -> Result<Vec<Address>>
pub async fn get_coins(&self) -> Result<HashMap<String, Coin>>
pub async fn get_coin( &self, currency: &str, chain: &str, ) -> Result<Option<Coin>>
pub async fn refresh_coins(&self) -> Result<()>
pub async fn create_payment_options( &self, options: &[PaymentOption], ) -> Result<Vec<PaymentOption>>
pub async fn start_price_updater(supabase: Arc<Self>)
pub async fn refresh_prices(&self) -> Result<()>
pub fn get_cached_price(&self, currency: &str) -> Option<Price>
pub async fn find_price( &self, base_currency: &str, currency: &str, ) -> Result<Option<Price>>
pub async fn update_invoice_status(&self, uid: &str, status: &str) -> Result<()>
pub async fn validate_api_key(&self, api_key: &str) -> Result<Option<i32>>
pub async fn cancel_invoice(&self, uid: &str, account_id: i32) -> Result<()>
Trait Implementations§
Source§impl Clone for SupabaseClient
impl Clone for SupabaseClient
Source§fn clone(&self) -> SupabaseClient
fn clone(&self) -> SupabaseClient
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for SupabaseClient
impl !RefUnwindSafe for SupabaseClient
impl Send for SupabaseClient
impl Sync for SupabaseClient
impl Unpin for SupabaseClient
impl !UnwindSafe for SupabaseClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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