pub struct AppResource<'a> { /* private fields */ }Expand description
Provides access to the App-related API endpoints.
Implementations§
Source§impl<'a> AppResource<'a>
impl<'a> AppResource<'a>
Sourcepub async fn get(
&self,
options: Option<&RequestOptions>,
) -> Result<App, OpencodeError>
pub async fn get( &self, options: Option<&RequestOptions>, ) -> Result<App, OpencodeError>
Retrieve application information (GET /app).
Sourcepub async fn init(
&self,
options: Option<&RequestOptions>,
) -> Result<AppInitResponse, OpencodeError>
pub async fn init( &self, options: Option<&RequestOptions>, ) -> Result<AppInitResponse, OpencodeError>
Initialise the application (POST /app/init).
Sourcepub async fn log(
&self,
params: &AppLogParams,
options: Option<&RequestOptions>,
) -> Result<AppLogResponse, OpencodeError>
pub async fn log( &self, params: &AppLogParams, options: Option<&RequestOptions>, ) -> Result<AppLogResponse, OpencodeError>
Send a log entry (POST /log).
Sourcepub async fn modes(
&self,
options: Option<&RequestOptions>,
) -> Result<AppModesResponse, OpencodeError>
pub async fn modes( &self, options: Option<&RequestOptions>, ) -> Result<AppModesResponse, OpencodeError>
List available modes (GET /mode).
Sourcepub async fn providers(
&self,
options: Option<&RequestOptions>,
) -> Result<AppProvidersResponse, OpencodeError>
pub async fn providers( &self, options: Option<&RequestOptions>, ) -> Result<AppProvidersResponse, OpencodeError>
List providers and their default models (GET /config/providers).
Auto Trait Implementations§
impl<'a> Freeze for AppResource<'a>
impl<'a> !RefUnwindSafe for AppResource<'a>
impl<'a> Send for AppResource<'a>
impl<'a> Sync for AppResource<'a>
impl<'a> Unpin for AppResource<'a>
impl<'a> !UnwindSafe for AppResource<'a>
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