pub struct InvokeOptions { /* private fields */ }Expand description
Options for invoking an Edge Function.
§Example
use supabase_client_functions::InvokeOptions;
use serde_json::json;
let opts = InvokeOptions::new()
.body(json!({"name": "World"}))
.header("x-custom", "value");Implementations§
Source§impl InvokeOptions
impl InvokeOptions
Sourcepub fn body_bytes(self, bytes: Vec<u8>) -> Self
pub fn body_bytes(self, bytes: Vec<u8>) -> Self
Set a raw binary body.
Sourcepub fn method(self, method: HttpMethod) -> Self
pub fn method(self, method: HttpMethod) -> Self
Set the HTTP method.
Sourcepub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a custom header.
Sourcepub fn region(self, region: FunctionRegion) -> Self
pub fn region(self, region: FunctionRegion) -> Self
Set the deployment region.
Sourcepub fn content_type(self, ct: impl Into<String>) -> Self
pub fn content_type(self, ct: impl Into<String>) -> Self
Override the Content-Type header explicitly.
Override the Authorization header (e.g., "Bearer <user-jwt>").
Trait Implementations§
Source§impl Clone for InvokeOptions
impl Clone for InvokeOptions
Source§fn clone(&self) -> InvokeOptions
fn clone(&self) -> InvokeOptions
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 moreSource§impl Debug for InvokeOptions
impl Debug for InvokeOptions
Auto Trait Implementations§
impl Freeze for InvokeOptions
impl RefUnwindSafe for InvokeOptions
impl Send for InvokeOptions
impl Sync for InvokeOptions
impl Unpin for InvokeOptions
impl UnsafeUnpin for InvokeOptions
impl UnwindSafe for InvokeOptions
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