pub async fn create(
        &self,
        opts: &ServiceOptions,
    ) -> Result<ServiceCreateInfo> {
        let body: Body = opts.serialize()?.into();
        let path = vec!["/service/create".to_owned()];

        let headers = opts
            .auth_header()
            .map(|a| iter::once(("X-Registry-Auth", a)));

        self.docker
            .post_json_headers(
                &path.join("?"),
                Some((body, mime::APPLICATION_JSON)),
                headers,
            )
            .await
    }
/// Creates a new service from ServiceOptions
Creates a new service from ServiceOptions
Creates a new service from ServiceOptions
pub async fn create(
        &self,
        opts: &ServiceOptions,
    ) -> Result<ServiceCreateInfo> {
        let body: Body = opts.serialize()?.into();
        let path = vec!["/service/create".to_owned()];
        let headers = opts
            .auth_header()
            .map(|a| iter::once(("X-Registry-Auth", a)));
        self.docker
            .post_json_headers(
                &path.join("?"),
                Some((body, mime::APPLICATION_JSON)),
                headers,
            )
            .await
    }
pub async fn create ( & self , opts : & ServiceOptions , ) -> Result < ServiceCreateInfo > { let body : Body = opts . serialize ( ) ? . into ( ) ; let path = vec ! [ " " to_owned ( ) ] ; let headers = opts . auth_header ( ) . map ( | a | iter :: once ( ( " " , a ) ) ) ; self . docker . post_json_headers ( & path . join ( " " ) , Some ( ( body , mime :: APPLICATION_JSON ) ) , headers , ) . await }
Creates a new service from ServiceOptions
Creates a new service from ServiceOptions
&self
opts
&ServiceOptions
&self
opts
&ServiceOptions