pub struct FormationsReq { /* private fields */ }
Expand description

Wraps an SDK FormationsRequest where we do additional things like re-use request access tokens, allow changing the Formation this request is pointed to, and map errors appropriately.

Implementations

Builds a FormationsRequest and immediately requests an access token using the given API key.

If the name is None it should be noted that the only request that can be made without error is FormationsRequest::list_names

Builds a FormationsRequest but does not request an access token using the given API key.

You must call refresh_token to have the access token requested.

Request a new Access Token

Retrieves the JWT access token, requesting a new one if required.

Sets the Formation name and re-builds the inner FormationsRequest also requesting a new access token if required

Retrieves all Formations and their Formation Configurations (both active and inactive) from the Compute API. Makes multiple calls against the API to gather the info and returns a Formations struct.

It should be noted that the local IDs associated with all the items in the Formations struct are generated unique after retrieval from the compute API. i.e. they do not match anything existing in the local DB even if the contents are otherwise identical.

Return a Vec of all known formation names if this FormationsReq currently has no name associated with it. Otherwise it returns the single name associated with this FormationsReq (returned in a Vec). This is used when the CLI supports either doing something to all formations, or just a single one that is passed in by the user.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more