struct
Supabase
pub struct Supabase {
/* private fields */
}A Supabase project: its tables (through PostgREST), RPC, auth and storage.
Methods
new
pub fn new(url: &str, anon_key: &str) -> SupabaseThe project URL (https://xyz.supabase.co) and its anon (or publishable) key.
with_token
pub fn with_token(self, access_token: &str) -> SupabaseAct as a signed-in user (their access token) instead of anon.
sign_in
pub fn sign_in(&self, email: &str, password: &str) -> RequestSign in with email and password; parse the reply with [Session::parse].
sign_up
pub fn sign_up(&self, email: &str, password: &str) -> RequestCreate an account (Supabase may send a confirmation email first).
refresh
pub fn refresh(&self, refresh_token: &str) -> RequestExchange a refresh token for a new session.
sign_out
pub fn sign_out(&self) -> RequestEnd the session of the token given to [Supabase::with_token].
public_url
pub fn public_url(&self, bucket: &str, path: &str) -> StringThe public URL of a file in a public storage bucket.