pub struct Over<E>(pub E);Expand description
An Exchange as an UpCloudApi: the ONE place a typed call becomes a
method, a path and a body.
Tuple Fields§
§0: ETrait Implementations§
Source§impl<E: Exchange> UpCloudApi for Over<E>
impl<E: Exchange> UpCloudApi for Over<E>
Source§fn describe(&self) -> String
fn describe(&self) -> String
A word for what answered, for a report that must never read as a
measurement of the account when it was not one.
Source§fn is_the_account(&self) -> bool
fn is_the_account(&self) -> bool
Is this the real account? A question about the implementation, never a
handle to one.
Source§fn account(&self) -> Result<Reply, String>
fn account(&self) -> Result<Reply, String>
GET /account. Callers: private-gunnar-ops, gunnar-loadbench,
private-holger-ops, monetize-cloud-impl (credential probe, grow judge).Source§fn servers(&self) -> Result<Reply, String>
fn servers(&self) -> Result<Reply, String>
GET /server. Callers: private-gunnar-ops / private-holger-ops orphan
sweeps, gunnar-loadbench.Source§fn servers_labelled(&self, labels: &[Label<'_>]) -> Result<Reply, String>
fn servers_labelled(&self, labels: &[Label<'_>]) -> Result<Reply, String>
GET /server?label=… — every label must match. Caller:
monetize-cloud-impl (the label search, and the inventory with none).Source§fn server(&self, uuid: &str) -> Result<Reply, String>
fn server(&self, uuid: &str) -> Result<Reply, String>
GET /server/{uuid}. Callers: everywhere.Source§fn firewall_rules(&self, uuid: &str) -> Result<Reply, String>
fn firewall_rules(&self, uuid: &str) -> Result<Reply, String>
GET /server/{uuid}/firewall_rule. Caller: private-gunnar-ops estate.Source§fn storages_private(&self) -> Result<Reply, String>
fn storages_private(&self) -> Result<Reply, String>
GET /storage/private. Callers: the orphan sweeps, gunnar-upcloud
(adopting media already on the account).Source§fn storages_labelled(&self, labels: &[Label<'_>]) -> Result<Reply, String>
fn storages_labelled(&self, labels: &[Label<'_>]) -> Result<Reply, String>
GET /storage?label=… — every label must match; no label lists
everything the account can see. Caller: monetize-cloud-impl.Source§fn storage(&self, uuid: &str) -> Result<Reply, String>
fn storage(&self, uuid: &str) -> Result<Reply, String>
GET /storage/{uuid}. Callers: grow, gunnar-upcloud’s online wait,
monetize-cloud-impl.Source§fn create_server(&self, document: &Value) -> Result<Reply, String>
fn create_server(&self, document: &Value) -> Result<Reply, String>
POST /server with the caller’s server document ({"server": {…}}).
The DOCUMENT is the caller’s — a plan, a template clone, labels, SSH
keys; the PATH is not. Caller: monetize-cloud-impl ensure.Source§fn stop_server(&self, uuid: &str, stop: Stop) -> Result<Reply, String>
fn stop_server(&self, uuid: &str, stop: Stop) -> Result<Reply, String>
POST /server/{uuid}/stop.Source§fn modify_server_plan(&self, uuid: &str, plan: &str) -> Result<Reply, String>
fn modify_server_plan(&self, uuid: &str, plan: &str) -> Result<Reply, String>
PUT /server/{uuid} with a plan — a plan change, which ALSO mints a
Resize Backup. Callers: private-gunnar-ops grow, monetize-cloud-impl.Source§fn set_boot_order(&self, uuid: &str, order: BootOrder) -> Result<Reply, String>
fn set_boot_order(&self, uuid: &str, order: BootOrder) -> Result<Reply, String>
PUT /server/{uuid} with a boot order. Caller: gunnar-upcloud.Source§fn set_console(&self, uuid: &str, console: Console<'_>) -> Result<Reply, String>
fn set_console(&self, uuid: &str, console: Console<'_>) -> Result<Reply, String>
PUT /server/{uuid} toggling the VNC console. Caller: gunnar-upcloud
console::open (the toggle that defeats the stale port).Source§fn attach_storage(
&self,
server: &str,
kind: DeviceKind,
storage: &str,
at: Option<&str>,
) -> Result<Reply, String>
fn attach_storage( &self, server: &str, kind: DeviceKind, storage: &str, at: Option<&str>, ) -> Result<Reply, String>
POST /server/{uuid}/storage/attach, optionally AT an address
(virtio, virtio:5). Callers: gunnar-upcloud (no address),
monetize-cloud-impl (always an address).Source§fn detach_storage(&self, server: &str, address: &str) -> Result<Reply, String>
fn detach_storage(&self, server: &str, address: &str) -> Result<Reply, String>
POST /server/{uuid}/storage/detach — names an ADDRESS (ide:0:0,
virtio:5), never a storage uuid. Callers: gunnar-upcloud,
monetize-cloud-impl.Source§fn eject_cdrom(&self, server: &str) -> Result<Reply, String>
fn eject_cdrom(&self, server: &str) -> Result<Reply, String>
POST /server/{uuid}/cdrom/eject — legal on a STARTED server
(MEASURED). Caller: gunnar-upcloud (the never-loop primitive).Source§fn delete_server(&self, uuid: &str, with: WithStorages) -> Result<Reply, String>
fn delete_server(&self, uuid: &str, with: WithStorages) -> Result<Reply, String>
DELETE /server/{uuid}. This really deletes.Source§fn create_storage(&self, new: &NewStorage<'_>) -> Result<Reply, String>
fn create_storage(&self, new: &NewStorage<'_>) -> Result<Reply, String>
POST /storage. Callers: gunnar-upcloud (the seed a medium is imported
into), monetize-cloud-impl (a labelled volume).Source§fn clone_storage(
&self,
uuid: &str,
title: &str,
zone: &str,
tier: &str,
) -> Result<Reply, String>
fn clone_storage( &self, uuid: &str, title: &str, zone: &str, tier: &str, ) -> Result<Reply, String>
POST /storage/{uuid}/clone. Caller: gunnar-upcloud clone_probe.Source§fn import_direct_upload(&self, uuid: &str) -> Result<Reply, String>
fn import_direct_upload(&self, uuid: &str) -> Result<Reply, String>
POST /storage/{uuid}/import with source: direct_upload — the reply
carries the URL UpCloudApi::upload_direct PUTs to. Caller:
gunnar-upcloud.Source§fn upload_direct(&self, url: &str, file: &Path) -> Result<Reply, String>
fn upload_direct(&self, url: &str, file: &Path) -> Result<Reply, String>
PUT <direct_upload_url> with the file’s bytes. The URL is the one
UpCloudApi::import_direct_upload answered, is itself a
credential (never printed whole; no bearer sent), and must belong to
the same cloud this implementation talks to — the account’s upload host
for the account, loopback for a mock. Caller: gunnar-upcloud.Source§fn modify_storage_size_as(
&self,
uuid: &str,
gb: u64,
spelling: SizeSpelling,
) -> Result<Reply, String>
fn modify_storage_size_as( &self, uuid: &str, gb: u64, spelling: SizeSpelling, ) -> Result<Reply, String>
PUT /storage/{uuid} with the size spelled as the CALLER has always
sent it. A port must not change a request’s wire format, and the two
callers disagree: private-gunnar-ops sends a string, monetize-cloud-impl
(the live money path) a number — and UpCloud’s own SDK declares sizes
int (T7, 2026-09-21). Nobody here holds a recorded account answer that
either spelling is accepted where the other is, so neither is chosen for
the other. Caller: monetize-cloud-impl grow (SizeSpelling::Number). Read moreSource§fn modify_storage_size(&self, uuid: &str, gb: u64) -> Result<Reply, String>
fn modify_storage_size(&self, uuid: &str, gb: u64) -> Result<Reply, String>
PUT /storage/{uuid} with a new size as a STRING ("64") — the volume
grows. Caller: private-gunnar-ops grow (its spelling since before this
crate; unchanged by the port).Auto Trait Implementations§
impl<E> Freeze for Over<E>where
E: Freeze,
impl<E> RefUnwindSafe for Over<E>where
E: RefUnwindSafe,
impl<E> Send for Over<E>where
E: Send,
impl<E> Sync for Over<E>where
E: Sync,
impl<E> Unpin for Over<E>where
E: Unpin,
impl<E> UnsafeUnpin for Over<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for Over<E>where
E: UnwindSafe,
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