pub struct ClientOptions {
pub base_url: Option<String>,
pub timeout: Option<Duration>,
pub max_retries: Option<u32>,
pub default_headers: Option<HeaderMap>,
pub default_query: Option<HashMap<String, String>>,
}Expand description
Configuration options for building an crate::client::Opencode client.
All fields are optional; unset fields fall back to defaults that match the
JS SDK behaviour. The Default implementation reads OPENCODE_BASE_URL
from the environment when available.
Fields§
§base_url: Option<String>Base URL of the OpenCode server.
timeout: Option<Duration>Per-request timeout.
max_retries: Option<u32>Maximum number of automatic retries for retryable errors.
default_headers: Option<HeaderMap>Headers sent with every request.
default_query: Option<HashMap<String, String>>Query parameters appended to every request URL.
Implementations§
Source§impl ClientOptions
impl ClientOptions
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Source§fn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
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 ClientOptions
impl Debug for ClientOptions
Auto Trait Implementations§
impl Freeze for ClientOptions
impl RefUnwindSafe for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl UnwindSafe for ClientOptions
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