pub struct InstanceService { /* private fields */ }Expand description
CRUD service for isolated local instances.
Implementations§
Source§impl InstanceService
impl InstanceService
pub fn root(&self) -> &Path
Sourcepub async fn create(&self, spec: InstanceSpec) -> Result<Instance>
pub async fn create(&self, spec: InstanceSpec) -> Result<Instance>
Creates the standard instance layout and persists its definition.
Sourcepub async fn get(&self, id: impl Into<String>) -> Result<Instance>
pub async fn get(&self, id: impl Into<String>) -> Result<Instance>
Loads and validates one persisted instance.
Sourcepub async fn list(&self) -> Result<Vec<Instance>>
pub async fn list(&self) -> Result<Vec<Instance>>
Lists local instances in deterministic identifier order.
Trait Implementations§
Source§impl Clone for InstanceService
impl Clone for InstanceService
Auto Trait Implementations§
impl Forget for InstanceService
impl Freeze for InstanceService
impl Move for InstanceService
impl RefUnwindSafe for InstanceService
impl Send for InstanceService
impl Sync for InstanceService
impl Unpin for InstanceService
impl UnsafeUnpin for InstanceService
impl UnwindSafe for InstanceService
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