pub struct CodespacesHandler<'octo> { /* private fields */ }Expand description
Handler for GitHub’s Codespaces API.
Created with Octocrab::codespaces.
Implementations§
Source§impl<'octo> CodespacesHandler<'octo>
impl<'octo> CodespacesHandler<'octo>
Sourcepub fn list(&self) -> ListCodespacesBuilder<'octo, '_>
pub fn list(&self) -> ListCodespacesBuilder<'octo, '_>
Lists codespaces for the authenticated user.
Sourcepub async fn create(&self, body: &CreateUserCodespace) -> Result<Codespace>
pub async fn create(&self, body: &CreateUserCodespace) -> Result<Codespace>
Creates a codespace for the authenticated user.
Sourcepub async fn get(&self, codespace_name: impl AsRef<str>) -> Result<Codespace>
pub async fn get(&self, codespace_name: impl AsRef<str>) -> Result<Codespace>
Gets a codespace for the authenticated user.
Sourcepub async fn update(
&self,
codespace_name: impl AsRef<str>,
patch: &UpdateCodespace,
) -> Result<Codespace>
pub async fn update( &self, codespace_name: impl AsRef<str>, patch: &UpdateCodespace, ) -> Result<Codespace>
Updates a codespace for the authenticated user.
Sourcepub async fn delete(&self, codespace_name: impl AsRef<str>) -> Result<()>
pub async fn delete(&self, codespace_name: impl AsRef<str>) -> Result<()>
Deletes a codespace for the authenticated user.
Sourcepub async fn start(&self, codespace_name: impl AsRef<str>) -> Result<Codespace>
pub async fn start(&self, codespace_name: impl AsRef<str>) -> Result<Codespace>
Starts a codespace for the authenticated user.
Sourcepub async fn stop(&self, codespace_name: impl AsRef<str>) -> Result<Codespace>
pub async fn stop(&self, codespace_name: impl AsRef<str>) -> Result<Codespace>
Stops a codespace for the authenticated user.
Sourcepub async fn publish(
&self,
codespace_name: impl AsRef<str>,
body: &PublishCodespace,
) -> Result<Codespace>
pub async fn publish( &self, codespace_name: impl AsRef<str>, body: &PublishCodespace, ) -> Result<Codespace>
Creates a repository from an unpublished codespace.
Sourcepub async fn export(
&self,
codespace_name: impl AsRef<str>,
) -> Result<CodespaceExportDetails>
pub async fn export( &self, codespace_name: impl AsRef<str>, ) -> Result<CodespaceExportDetails>
Triggers an export of a codespace for the authenticated user.
Sourcepub async fn get_export(
&self,
codespace_name: impl AsRef<str>,
export_id: impl AsRef<str>,
) -> Result<CodespaceExportDetails>
pub async fn get_export( &self, codespace_name: impl AsRef<str>, export_id: impl AsRef<str>, ) -> Result<CodespaceExportDetails>
Gets details about a codespace export.
Sourcepub async fn machines(
&self,
codespace_name: impl AsRef<str>,
) -> Result<Page<CodespaceMachine>>
pub async fn machines( &self, codespace_name: impl AsRef<str>, ) -> Result<Page<CodespaceMachine>>
Lists machine types available for a codespace.
Sourcepub fn secrets(&self) -> UserCodespacesSecretsHandler<'octo>
pub fn secrets(&self) -> UserCodespacesSecretsHandler<'octo>
Handler for managing user-scoped Codespaces secrets.
Auto Trait Implementations§
impl<'octo> !RefUnwindSafe for CodespacesHandler<'octo>
impl<'octo> !UnwindSafe for CodespacesHandler<'octo>
impl<'octo> Freeze for CodespacesHandler<'octo>
impl<'octo> Send for CodespacesHandler<'octo>
impl<'octo> Sync for CodespacesHandler<'octo>
impl<'octo> Unpin for CodespacesHandler<'octo>
impl<'octo> UnsafeUnpin for CodespacesHandler<'octo>
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