pub struct OpenCodeConfig {
pub base_url: String,
pub api_key: Option<String>,
pub timeout: Duration,
pub max_file_size: usize,
pub max_upload_size: usize,
pub indexing_timeout: Duration,
pub poll_interval: Duration,
}Expand description
Configuration for OpenCode client
Fields§
§base_url: StringBase URL of the OpenCode service
api_key: Option<String>API key for authentication (optional)
timeout: DurationRequest timeout
max_file_size: usizeMaximum file size to include (in bytes)
max_upload_size: usizeMaximum total upload size (in bytes)
indexing_timeout: DurationTimeout for indexing to complete
poll_interval: DurationPoll interval when waiting for indexing
Implementations§
Source§impl OpenCodeConfig
impl OpenCodeConfig
Sourcepub fn new(base_url: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>) -> Self
Create a new configuration with the given base URL
Sourcepub fn with_api_key(self, api_key: impl Into<String>) -> Self
pub fn with_api_key(self, api_key: impl Into<String>) -> Self
Set API key
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set request timeout
Sourcepub fn with_indexing_timeout(self, timeout: Duration) -> Self
pub fn with_indexing_timeout(self, timeout: Duration) -> Self
Set indexing timeout
Trait Implementations§
Source§impl Clone for OpenCodeConfig
impl Clone for OpenCodeConfig
Source§fn clone(&self) -> OpenCodeConfig
fn clone(&self) -> OpenCodeConfig
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 OpenCodeConfig
impl Debug for OpenCodeConfig
Source§impl Default for OpenCodeConfig
impl Default for OpenCodeConfig
Source§impl<'de> Deserialize<'de> for OpenCodeConfig
impl<'de> Deserialize<'de> for OpenCodeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OpenCodeConfig
impl RefUnwindSafe for OpenCodeConfig
impl Send for OpenCodeConfig
impl Sync for OpenCodeConfig
impl Unpin for OpenCodeConfig
impl UnwindSafe for OpenCodeConfig
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