pub struct VolumeInspect { /* private fields */ }Expand description
Inspect a volume.
§Examples
use ironflow_ops_docker::volumes::VolumeInspect;
use ironflow_ops_docker::DockerClient;
use ironflow_core::operation::Operation;
let client = DockerClient::connect_local().unwrap();
let op = VolumeInspect::new(&client, "my-volume");
assert_eq!(op.kind(), "docker");Implementations§
Source§impl VolumeInspect
impl VolumeInspect
Sourcepub fn new(client: impl Into<DockerRef>, name: impl Into<String>) -> Self
pub fn new(client: impl Into<DockerRef>, name: impl Into<String>) -> Self
Create a new volume-inspect operation.
Sourcepub async fn run(
&self,
_ctx: &OperationContext,
) -> Result<VolumeInspectOutput, OperationError>
pub async fn run( &self, _ctx: &OperationContext, ) -> Result<VolumeInspectOutput, OperationError>
Execute and return a typed result.
§Errors
Returns OperationError::External if the volume does not exist.
Trait Implementations§
Source§impl Operation for VolumeInspect
impl Operation for VolumeInspect
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 OperationContext,
) -> Pin<Box<dyn Future<Output = Result<Value, OperationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 OperationContext,
) -> Pin<Box<dyn Future<Output = Result<Value, OperationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the operation and return the result as JSON. Read more
Source§impl TypedOperation for VolumeInspect
impl TypedOperation for VolumeInspect
Source§type Output = VolumeInspectOutput
type Output = VolumeInspectOutput
The concrete output type that
Operation::execute produces.Auto Trait Implementations§
impl !RefUnwindSafe for VolumeInspect
impl !UnwindSafe for VolumeInspect
impl Freeze for VolumeInspect
impl Send for VolumeInspect
impl Sync for VolumeInspect
impl Unpin for VolumeInspect
impl UnsafeUnpin for VolumeInspect
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