pub struct Skills<'a> { /* private fields */ }skills only.Expand description
Namespace handle for the Skills API.
Obtained via Client::skills.
Implementations§
Source§impl<'a> Skills<'a>
impl<'a> Skills<'a>
Sourcepub async fn create(&self, request: CreateSkillRequest) -> Result<Skill>
pub async fn create(&self, request: CreateSkillRequest) -> Result<Skill>
POST /v1/skills – create a new skill from a multipart upload.
Multipart bodies are single-use; this method does not retry.
Sourcepub async fn list(
&self,
params: ListSkillsParams,
) -> Result<PaginatedNextPage<Skill>>
pub async fn list( &self, params: ListSkillsParams, ) -> Result<PaginatedNextPage<Skill>>
GET /v1/skills – one page of skills.
Sourcepub async fn get(&self, skill_id: &str) -> Result<Skill>
pub async fn get(&self, skill_id: &str) -> Result<Skill>
GET /v1/skills/{skill_id} – fetch a single skill.
Sourcepub async fn delete(&self, skill_id: &str) -> Result<SkillDeleted>
pub async fn delete(&self, skill_id: &str) -> Result<SkillDeleted>
DELETE /v1/skills/{skill_id} – delete a skill and all its
versions.
Sourcepub async fn create_version(
&self,
skill_id: &str,
files: Vec<SkillFile>,
) -> Result<SkillVersion>
pub async fn create_version( &self, skill_id: &str, files: Vec<SkillFile>, ) -> Result<SkillVersion>
POST /v1/skills/{skill_id}/versions – upload a new version.
The version inherits its display_title from the parent skill;
the request body carries only the file bundle.
Multipart bodies are single-use; this method does not retry.
Sourcepub async fn list_versions(
&self,
skill_id: &str,
params: ListSkillVersionsParams,
) -> Result<PaginatedNextPage<SkillVersion>>
pub async fn list_versions( &self, skill_id: &str, params: ListSkillVersionsParams, ) -> Result<PaginatedNextPage<SkillVersion>>
GET /v1/skills/{skill_id}/versions – one page of versions.
Sourcepub async fn get_version(
&self,
skill_id: &str,
version: &str,
) -> Result<SkillVersion>
pub async fn get_version( &self, skill_id: &str, version: &str, ) -> Result<SkillVersion>
GET /v1/skills/{skill_id}/versions/{version} – fetch a single
version.
Sourcepub async fn delete_version(
&self,
skill_id: &str,
version: &str,
) -> Result<SkillVersionDeleted>
pub async fn delete_version( &self, skill_id: &str, version: &str, ) -> Result<SkillVersionDeleted>
DELETE /v1/skills/{skill_id}/versions/{version} – delete one
version.
Auto Trait Implementations§
impl<'a> Freeze for Skills<'a>
impl<'a> !RefUnwindSafe for Skills<'a>
impl<'a> Send for Skills<'a>
impl<'a> Sync for Skills<'a>
impl<'a> Unpin for Skills<'a>
impl<'a> UnsafeUnpin for Skills<'a>
impl<'a> !UnwindSafe for Skills<'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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more