pub struct ScriptsClient { /* private fields */ }Expand description
Sub-client for script management. Obtained via AkribesClient::project(id).scripts().
Implementations§
Source§impl ScriptsClient
impl ScriptsClient
pub async fn list(&self) -> Result<Vec<Script>>
pub async fn get(&self, name: &str) -> Result<Option<Script>>
pub async fn create(&self, name: &str, source: &str) -> Result<Script>
pub async fn rename(&self, old_name: &str, new_name: &str) -> Result<()>
Sourcepub async fn resolve(&self, id_or_name: &str) -> Result<Option<Script>>
pub async fn resolve(&self, id_or_name: &str) -> Result<Option<Script>>
Look up a script by numeric id (if id_or_name parses as i64) or by
exact name. Returns None when nothing matches. Ids are resolved by
listing and filtering — there is no GET-by-id server route.
pub async fn delete(&self, name: &str) -> Result<()>
Sourcepub async fn duplicate(&self, name: &str) -> Result<Script>
pub async fn duplicate(&self, name: &str) -> Result<Script>
Duplicate a script within this project. The server picks a copy name
(e.g. foo copy) and returns the new script.
Trait Implementations§
Source§impl Clone for ScriptsClient
impl Clone for ScriptsClient
Source§fn clone(&self) -> ScriptsClient
fn clone(&self) -> ScriptsClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScriptsClient
impl !RefUnwindSafe for ScriptsClient
impl Send for ScriptsClient
impl Sync for ScriptsClient
impl Unpin for ScriptsClient
impl UnsafeUnpin for ScriptsClient
impl !UnwindSafe for ScriptsClient
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