pub struct Client<C, B = Body> { /* private fields */ }
Expand description

A Client to access metadata service.

Implementations

Create a new Client with the default config.

Get value from the metadata service.

Get value from the metadata service.

Report whether this process is running on Google Compute Engine.

Get the current instance’s project ID string.

Get the current instance’s numeric project ID.

Get the instance’s primary internal IP address.

Get the instance’s primary external (public) IP address.

Get service account’s email.

Get the instance’s hostname.

This will be of the form <instance_id>.c.<project_id>.internal.

Get the list of user-defined instance tags, assigned when initially creating a GCE instance.

Get the current VM’s numeric instance ID.

Get the current VM’s instance ID string.

Get the current VM’s zone, such as us-central1-b.

Get the list of user-defined attributes, assigned when initially creating a GCE VM instance.

Get the list of user-defined attributes applying to the project as a whole, not just this VM.

Get the value of the provided VM instance attribute.

Get the value of the provided project attribute.

Get the service account scopes for the given account.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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