pub trait OciProxy {
type Socket: Socket;
Show 23 methods
// Required methods
async fn list_images(
&mut self,
handle: u64,
filter: Option<&str>,
) -> Result<Result<ListImagesReply, OciError>>;
async fn oci_fsck(
&mut self,
handle: u64,
image: Option<&str>,
) -> Result<Result<OciFsckReply, OciError>>;
async fn inspect(
&mut self,
handle: u64,
image: &str,
) -> Result<Result<OciInspectReply, OciError>>;
async fn tag(
&mut self,
handle: u64,
manifest_digest: &str,
name: &str,
) -> Result<Result<(), OciError>>;
async fn untag(
&mut self,
handle: u64,
name: &str,
) -> Result<Result<(), OciError>>;
async fn compute_id(
&mut self,
handle: u64,
image: &str,
verity: Option<&str>,
bootable: bool,
xattrs: Option<XattrFiltering>,
) -> Result<Result<OciComputeIdReply, OciError>>;
async fn pull(
&mut self,
handle: u64,
image: &str,
name: Option<&str>,
local_fetch: &str,
storage_root: Option<&str>,
bootable: bool,
xattrs: Option<XattrFiltering>,
expected_digest: Option<&str>,
) -> Result<impl Stream<Item = Result<Result<PullProgress, OciError>>>>;
async fn get_info(&mut self) -> Result<Result<GetInfoReply, OciError>>;
async fn has_layer(
&mut self,
handle: u64,
diff_id: &str,
) -> Result<Result<HasLayerReply, OciError>>;
async fn get_layer(
&mut self,
handle: u64,
params: GetLayerParams,
) -> Result<impl Stream<Item = Result<(Result<GetLayerReply, OciError>, Vec<OwnedFd>)>>>;
async fn put_layer(
&mut self,
handle: u64,
diff_id: &str,
zerocopy: bool,
fds: Vec<OwnedFd>,
) -> Result<Result<PutLayerReply, OciError>>;
async fn finalize_image(
&mut self,
handle: u64,
manifest_json: &str,
config_json: &str,
layers: Vec<LayerRef>,
name: Option<&str>,
) -> Result<Result<FinalizeImageReply, OciError>>;
fn chain_list_images<'c, '__proxy_params>(
&'c mut self,
handle: u64,
filter: Option<&'__proxy_params str>,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_oci_fsck<'c, '__proxy_params>(
&'c mut self,
handle: u64,
image: Option<&'__proxy_params str>,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_inspect<'c, '__proxy_params>(
&'c mut self,
handle: u64,
image: &'__proxy_params str,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_tag<'c, '__proxy_params>(
&'c mut self,
handle: u64,
manifest_digest: &'__proxy_params str,
name: &'__proxy_params str,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_untag<'c, '__proxy_params>(
&'c mut self,
handle: u64,
name: &'__proxy_params str,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_compute_id<'c, '__proxy_params>(
&'c mut self,
handle: u64,
image: &'__proxy_params str,
verity: Option<&'__proxy_params str>,
bootable: bool,
xattrs: Option<XattrFiltering>,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_pull<'c, '__proxy_params>(
&'c mut self,
handle: u64,
image: &'__proxy_params str,
name: Option<&'__proxy_params str>,
local_fetch: &'__proxy_params str,
storage_root: Option<&'__proxy_params str>,
bootable: bool,
xattrs: Option<XattrFiltering>,
expected_digest: Option<&'__proxy_params str>,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_get_info<'c>(&'c mut self) -> Result<Chain<'c, Self::Socket>>;
fn chain_has_layer<'c, '__proxy_params>(
&'c mut self,
handle: u64,
diff_id: &'__proxy_params str,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_put_layer<'c, '__proxy_params>(
&'c mut self,
handle: u64,
diff_id: &'__proxy_params str,
zerocopy: bool,
fds: Vec<OwnedFd>,
) -> Result<Chain<'c, Self::Socket>>;
fn chain_finalize_image<'c, '__proxy_params>(
&'c mut self,
handle: u64,
manifest_json: &'__proxy_params str,
config_json: &'__proxy_params str,
layers: Vec<LayerRef>,
name: Option<&'__proxy_params str>,
) -> Result<Chain<'c, Self::Socket>>;
}Expand description
Typed client for the org.composefs.Oci interface.
Required Associated Types§
Required Methods§
Sourceasync fn list_images(
&mut self,
handle: u64,
filter: Option<&str>,
) -> Result<Result<ListImagesReply, OciError>>
async fn list_images( &mut self, handle: u64, filter: Option<&str>, ) -> Result<Result<ListImagesReply, OciError>>
List tagged OCI images.
Sourceasync fn oci_fsck(
&mut self,
handle: u64,
image: Option<&str>,
) -> Result<Result<OciFsckReply, OciError>>
async fn oci_fsck( &mut self, handle: u64, image: Option<&str>, ) -> Result<Result<OciFsckReply, OciError>>
Run an OCI-aware consistency check (wire method Check).
Sourceasync fn inspect(
&mut self,
handle: u64,
image: &str,
) -> Result<Result<OciInspectReply, OciError>>
async fn inspect( &mut self, handle: u64, image: &str, ) -> Result<Result<OciInspectReply, OciError>>
Inspect a single OCI image.
Sourceasync fn tag(
&mut self,
handle: u64,
manifest_digest: &str,
name: &str,
) -> Result<Result<(), OciError>>
async fn tag( &mut self, handle: u64, manifest_digest: &str, name: &str, ) -> Result<Result<(), OciError>>
Tag a manifest digest with a name.
Sourceasync fn untag(
&mut self,
handle: u64,
name: &str,
) -> Result<Result<(), OciError>>
async fn untag( &mut self, handle: u64, name: &str, ) -> Result<Result<(), OciError>>
Remove a tag.
Sourceasync fn compute_id(
&mut self,
handle: u64,
image: &str,
verity: Option<&str>,
bootable: bool,
xattrs: Option<XattrFiltering>,
) -> Result<Result<OciComputeIdReply, OciError>>
async fn compute_id( &mut self, handle: u64, image: &str, verity: Option<&str>, bootable: bool, xattrs: Option<XattrFiltering>, ) -> Result<Result<OciComputeIdReply, OciError>>
Compute the composefs image ID for an OCI image.
Sourceasync fn pull(
&mut self,
handle: u64,
image: &str,
name: Option<&str>,
local_fetch: &str,
storage_root: Option<&str>,
bootable: bool,
xattrs: Option<XattrFiltering>,
expected_digest: Option<&str>,
) -> Result<impl Stream<Item = Result<Result<PullProgress, OciError>>>>
async fn pull( &mut self, handle: u64, image: &str, name: Option<&str>, local_fetch: &str, storage_root: Option<&str>, bootable: bool, xattrs: Option<XattrFiltering>, expected_digest: Option<&str>, ) -> Result<impl Stream<Item = Result<Result<PullProgress, OciError>>>>
Pull an OCI image, streaming progress frames.
Sourceasync fn get_info(&mut self) -> Result<Result<GetInfoReply, OciError>>
async fn get_info(&mut self) -> Result<Result<GetInfoReply, OciError>>
Query capability tokens supported by the service.
Sourceasync fn has_layer(
&mut self,
handle: u64,
diff_id: &str,
) -> Result<Result<HasLayerReply, OciError>>
async fn has_layer( &mut self, handle: u64, diff_id: &str, ) -> Result<Result<HasLayerReply, OciError>>
Check whether a layer is present in the repository.
Sourceasync fn get_layer(
&mut self,
handle: u64,
params: GetLayerParams,
) -> Result<impl Stream<Item = Result<(Result<GetLayerReply, OciError>, Vec<OwnedFd>)>>>
async fn get_layer( &mut self, handle: u64, params: GetLayerParams, ) -> Result<impl Stream<Item = Result<(Result<GetLayerReply, OciError>, Vec<OwnedFd>)>>>
Stream the layer as a splitdirfdstream with full hardened fd-transport
contract (sparse dirfds, keepalive, lifetime fds, multi-frame).
Drive the returned stream to completion (until continues=false),
concatenating each frame’s fd batch in order to reconstruct the full
logical FD array [pipe_read, dirfds.., lifetime_fds..].
Sourceasync fn put_layer(
&mut self,
handle: u64,
diff_id: &str,
zerocopy: bool,
fds: Vec<OwnedFd>,
) -> Result<Result<PutLayerReply, OciError>>
async fn put_layer( &mut self, handle: u64, diff_id: &str, zerocopy: bool, fds: Vec<OwnedFd>, ) -> Result<Result<PutLayerReply, OciError>>
Receive a layer as a splitdirfdstream from the client and import
it into the server’s repository with diff_id verification.
fds[0] is the pipe read end; fds[1..] are source object dirs.
Sourceasync fn finalize_image(
&mut self,
handle: u64,
manifest_json: &str,
config_json: &str,
layers: Vec<LayerRef>,
name: Option<&str>,
) -> Result<Result<FinalizeImageReply, OciError>>
async fn finalize_image( &mut self, handle: u64, manifest_json: &str, config_json: &str, layers: Vec<LayerRef>, name: Option<&str>, ) -> Result<Result<FinalizeImageReply, OciError>>
Finalize an OCI image after all layers have been imported.
layers must be in manifest layer order; each entry pairs the layer’s
OCI diff-id with the hex verity returned by PutLayer. name is the
tag to assign (optional). Idempotent.
Sourcefn chain_list_images<'c, '__proxy_params>(
&'c mut self,
handle: u64,
filter: Option<&'__proxy_params str>,
) -> Result<Chain<'c, Self::Socket>>
fn chain_list_images<'c, '__proxy_params>( &'c mut self, handle: u64, filter: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Sourcefn chain_oci_fsck<'c, '__proxy_params>(
&'c mut self,
handle: u64,
image: Option<&'__proxy_params str>,
) -> Result<Chain<'c, Self::Socket>>
fn chain_oci_fsck<'c, '__proxy_params>( &'c mut self, handle: u64, image: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Sourcefn chain_inspect<'c, '__proxy_params>(
&'c mut self,
handle: u64,
image: &'__proxy_params str,
) -> Result<Chain<'c, Self::Socket>>
fn chain_inspect<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Sourcefn chain_tag<'c, '__proxy_params>(
&'c mut self,
handle: u64,
manifest_digest: &'__proxy_params str,
name: &'__proxy_params str,
) -> Result<Chain<'c, Self::Socket>>
fn chain_tag<'c, '__proxy_params>( &'c mut self, handle: u64, manifest_digest: &'__proxy_params str, name: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Sourcefn chain_untag<'c, '__proxy_params>(
&'c mut self,
handle: u64,
name: &'__proxy_params str,
) -> Result<Chain<'c, Self::Socket>>
fn chain_untag<'c, '__proxy_params>( &'c mut self, handle: u64, name: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Sourcefn chain_compute_id<'c, '__proxy_params>(
&'c mut self,
handle: u64,
image: &'__proxy_params str,
verity: Option<&'__proxy_params str>,
bootable: bool,
xattrs: Option<XattrFiltering>,
) -> Result<Chain<'c, Self::Socket>>
fn chain_compute_id<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, verity: Option<&'__proxy_params str>, bootable: bool, xattrs: Option<XattrFiltering>, ) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Sourcefn chain_pull<'c, '__proxy_params>(
&'c mut self,
handle: u64,
image: &'__proxy_params str,
name: Option<&'__proxy_params str>,
local_fetch: &'__proxy_params str,
storage_root: Option<&'__proxy_params str>,
bootable: bool,
xattrs: Option<XattrFiltering>,
expected_digest: Option<&'__proxy_params str>,
) -> Result<Chain<'c, Self::Socket>>
fn chain_pull<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, name: Option<&'__proxy_params str>, local_fetch: &'__proxy_params str, storage_root: Option<&'__proxy_params str>, bootable: bool, xattrs: Option<XattrFiltering>, expected_digest: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Sourcefn chain_get_info<'c>(&'c mut self) -> Result<Chain<'c, Self::Socket>>
fn chain_get_info<'c>(&'c mut self) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Sourcefn chain_has_layer<'c, '__proxy_params>(
&'c mut self,
handle: u64,
diff_id: &'__proxy_params str,
) -> Result<Chain<'c, Self::Socket>>
fn chain_has_layer<'c, '__proxy_params>( &'c mut self, handle: u64, diff_id: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>
Start a chain with this method call.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".