pub struct Control { /* private fields */ }Expand description
The control-plane routes, from Client::control. Cheap to clone.
Implementations§
Source§impl Control
impl Control
pub async fn create_tenant(&self, name: &str) -> Result<Tenant>
Sourcepub async fn applications(
&self,
tenant_id: &str,
) -> Result<Vec<ApplicationRecord>>
pub async fn applications( &self, tenant_id: &str, ) -> Result<Vec<ApplicationRecord>>
A tenant’s applications that this key can see.
pub async fn create_application( &self, tenant_id: &str, name: &str, ) -> Result<ApplicationRecord>
pub async fn application( &self, application_id: &str, ) -> Result<ApplicationRecord>
Sourcepub async fn create_draft(
&self,
application_id: &str,
base_revision_id: Option<&str>,
) -> Result<ApplicationDraft>
pub async fn create_draft( &self, application_id: &str, base_revision_id: Option<&str>, ) -> Result<ApplicationDraft>
Start a draft of the application’s contract from base_revision_id, or from an empty
manifest.
pub async fn draft( &self, application_id: &str, draft_id: &str, ) -> Result<ApplicationDraft>
Sourcepub async fn update_draft(
&self,
application_id: &str,
draft_id: &str,
version: u64,
manifest: &ApplicationManifest,
) -> Result<ApplicationDraft>
pub async fn update_draft( &self, application_id: &str, draft_id: &str, version: u64, manifest: &ApplicationManifest, ) -> Result<ApplicationDraft>
Replace the draft’s manifest, only if the draft is still at version (the
ApplicationDraft::version last read); a concurrent edit is refused, not overwritten.
Sourcepub async fn validate_draft(
&self,
application_id: &str,
draft_id: &str,
) -> Result<ValidationReport>
pub async fn validate_draft( &self, application_id: &str, draft_id: &str, ) -> Result<ValidationReport>
Validate the draft without committing it. An invalid manifest is a report with
valid: false and its issues, not an error.
Sourcepub async fn commit_draft(
&self,
application_id: &str,
draft_id: &str,
) -> Result<ApplicationRevision>
pub async fn commit_draft( &self, application_id: &str, draft_id: &str, ) -> Result<ApplicationRevision>
Commit the draft as an immutable revision. No environment runs it until it is promoted.
pub async fn revision( &self, application_id: &str, revision_id: &str, ) -> Result<ApplicationRevision>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Control
impl !UnwindSafe for Control
impl Freeze for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
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