pub struct ConvexClientBuilder { /* private fields */ }Expand description
A builder for creating a ConvexClient with custom configuration.
Implementations§
Source§impl ConvexClientBuilder
impl ConvexClientBuilder
Sourcepub fn new(deployment_url: &str) -> Self
pub fn new(deployment_url: &str) -> Self
Create a new ConvexClientBuilder with the given deployment URL.
Sourcepub fn with_client_id(self, client_id: &str) -> Self
pub fn with_client_id(self, client_id: &str) -> Self
Set a custom client ID for this client.
Sourcepub fn with_on_state_change(
self,
on_state_change: Sender<WebSocketState>,
) -> Self
pub fn with_on_state_change( self, on_state_change: Sender<WebSocketState>, ) -> Self
Set a channel to be notified of changes to the WebSocket connection state.
Sourcepub async fn build(self) -> Result<ConvexClient>
pub async fn build(self) -> Result<ConvexClient>
Build the ConvexClient with the configured options.
let client = ConvexClientBuilder::new("https://cool-music-123.convex.cloud").build().await?;Auto Trait Implementations§
impl Freeze for ConvexClientBuilder
impl RefUnwindSafe for ConvexClientBuilder
impl Send for ConvexClientBuilder
impl Sync for ConvexClientBuilder
impl Unpin for ConvexClientBuilder
impl UnwindSafe for ConvexClientBuilder
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