pub struct InstanceMethods<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

A builder providing access to all methods supported on instance resources. It is not used directly, but through the Compute hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_compute1 as compute1;
 
use std::default::Default;
use compute1::{Compute, oauth2, hyper, hyper_rustls, chrono, FieldMask};
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
        secret,
        oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = Compute::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `add_access_config(...)`, `add_resource_policies(...)`, `aggregated_list(...)`, `attach_disk(...)`, `bulk_insert(...)`, `delete(...)`, `delete_access_config(...)`, `detach_disk(...)`, `get(...)`, `get_effective_firewalls(...)`, `get_guest_attributes(...)`, `get_iam_policy(...)`, `get_screenshot(...)`, `get_serial_port_output(...)`, `get_shielded_instance_identity(...)`, `insert(...)`, `list(...)`, `list_referrers(...)`, `perform_maintenance(...)`, `remove_resource_policies(...)`, `reset(...)`, `resume(...)`, `send_diagnostic_interrupt(...)`, `set_deletion_protection(...)`, `set_disk_auto_delete(...)`, `set_iam_policy(...)`, `set_labels(...)`, `set_machine_resources(...)`, `set_machine_type(...)`, `set_metadata(...)`, `set_min_cpu_platform(...)`, `set_name(...)`, `set_scheduling(...)`, `set_security_policy(...)`, `set_service_account(...)`, `set_shielded_instance_integrity_policy(...)`, `set_tags(...)`, `simulate_maintenance_event(...)`, `start(...)`, `start_with_encryption_key(...)`, `stop(...)`, `suspend(...)`, `test_iam_permissions(...)`, `update(...)`, `update_access_config(...)`, `update_display_device(...)`, `update_network_interface(...)` and `update_shielded_instance_config(...)`
// to build up your call.
let rb = hub.instances();

Implementations§

source§

impl<'a, S> InstanceMethods<'a, S>

source

pub fn add_access_config( &self, request: AccessConfig, project: &str, zone: &str, instance: &str, network_interface: &str ) -> InstanceAddAccessConfigCall<'a, S>

Create a builder to help you perform the following task:

Adds an access config to an instance’s network interface.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
  • networkInterface - The name of the network interface to add to this instance.
source

pub fn add_resource_policies( &self, request: InstancesAddResourcePoliciesRequest, project: &str, zone: &str, instance: &str ) -> InstanceAddResourcePolicyCall<'a, S>

Create a builder to help you perform the following task:

Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
source

pub fn aggregated_list( &self, project: &str ) -> InstanceAggregatedListCall<'a, S>

Create a builder to help you perform the following task:

Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

§Arguments
  • project - Project ID for this request.
source

pub fn attach_disk( &self, request: AttachedDisk, project: &str, zone: &str, instance: &str ) -> InstanceAttachDiskCall<'a, S>

Create a builder to help you perform the following task:

Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
source

pub fn bulk_insert( &self, request: BulkInsertInstanceResource, project: &str, zone: &str ) -> InstanceBulkInsertCall<'a, S>

Create a builder to help you perform the following task:

Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
source

pub fn delete( &self, project: &str, zone: &str, instance: &str ) -> InstanceDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes the specified Instance resource. For more information, see Deleting an instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to delete.
source

pub fn delete_access_config( &self, project: &str, zone: &str, instance: &str, access_config: &str, network_interface: &str ) -> InstanceDeleteAccessConfigCall<'a, S>

Create a builder to help you perform the following task:

Deletes an access config from an instance’s network interface.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
  • accessConfig - The name of the access config to delete.
  • networkInterface - The name of the network interface.
source

pub fn detach_disk( &self, project: &str, zone: &str, instance: &str, device_name: &str ) -> InstanceDetachDiskCall<'a, S>

Create a builder to help you perform the following task:

Detaches a disk from an instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Instance name for this request.
  • deviceName - The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.
source

pub fn get( &self, project: &str, zone: &str, instance: &str ) -> InstanceGetCall<'a, S>

Create a builder to help you perform the following task:

Returns the specified Instance resource.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to return.
source

pub fn get_effective_firewalls( &self, project: &str, zone: &str, instance: &str, network_interface: &str ) -> InstanceGetEffectiveFirewallCall<'a, S>

Create a builder to help you perform the following task:

Returns effective firewalls applied to an interface of the instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
  • networkInterface - The name of the network interface to get the effective firewalls.
source

pub fn get_guest_attributes( &self, project: &str, zone: &str, instance: &str ) -> InstanceGetGuestAttributeCall<'a, S>

Create a builder to help you perform the following task:

Returns the specified guest attributes entry.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn get_iam_policy( &self, project: &str, zone: &str, resource: &str ) -> InstanceGetIamPolicyCall<'a, S>

Create a builder to help you perform the following task:

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • resource - Name or id of the resource for this request.
source

pub fn get_screenshot( &self, project: &str, zone: &str, instance: &str ) -> InstanceGetScreenshotCall<'a, S>

Create a builder to help you perform the following task:

Returns the screenshot from the specified instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn get_serial_port_output( &self, project: &str, zone: &str, instance: &str ) -> InstanceGetSerialPortOutputCall<'a, S>

Create a builder to help you perform the following task:

Returns the last 1 MB of serial port output from the specified instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance for this request.
source

pub fn get_shielded_instance_identity( &self, project: &str, zone: &str, instance: &str ) -> InstanceGetShieldedInstanceIdentityCall<'a, S>

Create a builder to help you perform the following task:

Returns the Shielded Instance Identity of an instance

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name or id of the instance scoping this request.
source

pub fn insert( &self, request: Instance, project: &str, zone: &str ) -> InstanceInsertCall<'a, S>

Create a builder to help you perform the following task:

Creates an instance resource in the specified project using the data included in the request.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
source

pub fn list(&self, project: &str, zone: &str) -> InstanceListCall<'a, S>

Create a builder to help you perform the following task:

Retrieves the list of instances contained within the specified zone.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
source

pub fn list_referrers( &self, project: &str, zone: &str, instance: &str ) -> InstanceListReferrerCall<'a, S>

Create a builder to help you perform the following task:

Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the target instance scoping this request, or ‘-’ if the request should span over all instances in the container.
source

pub fn perform_maintenance( &self, project: &str, zone: &str, instance: &str ) -> InstancePerformMaintenanceCall<'a, S>

Create a builder to help you perform the following task:

Perform a manual maintenance on the instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn remove_resource_policies( &self, request: InstancesRemoveResourcePoliciesRequest, project: &str, zone: &str, instance: &str ) -> InstanceRemoveResourcePolicyCall<'a, S>

Create a builder to help you perform the following task:

Removes resource policies from an instance.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
source

pub fn reset( &self, project: &str, zone: &str, instance: &str ) -> InstanceResetCall<'a, S>

Create a builder to help you perform the following task:

Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn resume( &self, project: &str, zone: &str, instance: &str ) -> InstanceResumeCall<'a, S>

Create a builder to help you perform the following task:

Resumes an instance that was suspended using the instances().suspend method.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to resume.
source

pub fn send_diagnostic_interrupt( &self, project: &str, zone: &str, instance: &str ) -> InstanceSendDiagnosticInterruptCall<'a, S>

Create a builder to help you perform the following task:

Sends diagnostic interrupt to the instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn set_deletion_protection( &self, project: &str, zone: &str, resource: &str ) -> InstanceSetDeletionProtectionCall<'a, S>

Create a builder to help you perform the following task:

Sets deletion protection on the instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • resource - Name or id of the resource for this request.
source

pub fn set_disk_auto_delete( &self, project: &str, zone: &str, instance: &str, auto_delete: bool, device_name: &str ) -> InstanceSetDiskAutoDeleteCall<'a, S>

Create a builder to help you perform the following task:

Sets the auto-delete flag for a disk attached to an instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
  • autoDelete - Whether to auto-delete the disk when the instance is deleted.
  • deviceName - The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.
source

pub fn set_iam_policy( &self, request: ZoneSetPolicyRequest, project: &str, zone: &str, resource: &str ) -> InstanceSetIamPolicyCall<'a, S>

Create a builder to help you perform the following task:

Sets the access control policy on the specified resource. Replaces any existing policy.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • resource - Name or id of the resource for this request.
source

pub fn set_labels( &self, request: InstancesSetLabelsRequest, project: &str, zone: &str, instance: &str ) -> InstanceSetLabelCall<'a, S>

Create a builder to help you perform the following task:

Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn set_machine_resources( &self, request: InstancesSetMachineResourcesRequest, project: &str, zone: &str, instance: &str ) -> InstanceSetMachineResourceCall<'a, S>

Create a builder to help you perform the following task:

Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn set_machine_type( &self, request: InstancesSetMachineTypeRequest, project: &str, zone: &str, instance: &str ) -> InstanceSetMachineTypeCall<'a, S>

Create a builder to help you perform the following task:

Changes the machine type for a stopped instance to the machine type specified in the request.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn set_metadata( &self, request: Metadata, project: &str, zone: &str, instance: &str ) -> InstanceSetMetadataCall<'a, S>

Create a builder to help you perform the following task:

Sets metadata for the specified instance to the data included in the request.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn set_min_cpu_platform( &self, request: InstancesSetMinCpuPlatformRequest, project: &str, zone: &str, instance: &str ) -> InstanceSetMinCpuPlatformCall<'a, S>

Create a builder to help you perform the following task:

Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn set_name( &self, request: InstancesSetNameRequest, project: &str, zone: &str, instance: &str ) -> InstanceSetNameCall<'a, S>

Create a builder to help you perform the following task:

Sets name of an instance.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
source

pub fn set_scheduling( &self, request: Scheduling, project: &str, zone: &str, instance: &str ) -> InstanceSetSchedulingCall<'a, S>

Create a builder to help you perform the following task:

Sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Instance name for this request.
source

pub fn set_security_policy( &self, request: InstancesSetSecurityPolicyRequest, project: &str, zone: &str, instance: &str ) -> InstanceSetSecurityPolicyCall<'a, S>

Create a builder to help you perform the following task:

Sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - Name of the zone scoping this request.
  • instance - Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035.
source

pub fn set_service_account( &self, request: InstancesSetServiceAccountRequest, project: &str, zone: &str, instance: &str ) -> InstanceSetServiceAccountCall<'a, S>

Create a builder to help you perform the following task:

Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to start.
source

pub fn set_shielded_instance_integrity_policy( &self, request: ShieldedInstanceIntegrityPolicy, project: &str, zone: &str, instance: &str ) -> InstanceSetShieldedInstanceIntegrityPolicyCall<'a, S>

Create a builder to help you perform the following task:

Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name or id of the instance scoping this request.
source

pub fn set_tags( &self, request: Tags, project: &str, zone: &str, instance: &str ) -> InstanceSetTagCall<'a, S>

Create a builder to help you perform the following task:

Sets network tags for the specified instance to the data included in the request.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn simulate_maintenance_event( &self, project: &str, zone: &str, instance: &str ) -> InstanceSimulateMaintenanceEventCall<'a, S>

Create a builder to help you perform the following task:

Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn start( &self, project: &str, zone: &str, instance: &str ) -> InstanceStartCall<'a, S>

Create a builder to help you perform the following task:

Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to start.
source

pub fn start_with_encryption_key( &self, request: InstancesStartWithEncryptionKeyRequest, project: &str, zone: &str, instance: &str ) -> InstanceStartWithEncryptionKeyCall<'a, S>

Create a builder to help you perform the following task:

Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to start.
source

pub fn stop( &self, project: &str, zone: &str, instance: &str ) -> InstanceStopCall<'a, S>

Create a builder to help you perform the following task:

Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to stop.
source

pub fn suspend( &self, project: &str, zone: &str, instance: &str ) -> InstanceSuspendCall<'a, S>

Create a builder to help you perform the following task:

This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to suspend.
source

pub fn test_iam_permissions( &self, request: TestPermissionsRequest, project: &str, zone: &str, resource: &str ) -> InstanceTestIamPermissionCall<'a, S>

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified resource.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • resource - Name or id of the resource for this request.
source

pub fn update( &self, request: Instance, project: &str, zone: &str, instance: &str ) -> InstanceUpdateCall<'a, S>

Create a builder to help you perform the following task:

Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance resource to update.
source

pub fn update_access_config( &self, request: AccessConfig, project: &str, zone: &str, instance: &str, network_interface: &str ) -> InstanceUpdateAccessConfigCall<'a, S>

Create a builder to help you perform the following task:

Updates the specified access config from an instance’s network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
  • networkInterface - The name of the network interface where the access config is attached.
source

pub fn update_display_device( &self, request: DisplayDevice, project: &str, zone: &str, instance: &str ) -> InstanceUpdateDisplayDeviceCall<'a, S>

Create a builder to help you perform the following task:

Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name of the instance scoping this request.
source

pub fn update_network_interface( &self, request: NetworkInterface, project: &str, zone: &str, instance: &str, network_interface: &str ) -> InstanceUpdateNetworkInterfaceCall<'a, S>

Create a builder to help you perform the following task:

Updates an instance’s network interface. This method can only update an interface’s alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - The instance name for this request.
  • networkInterface - The name of the network interface to update.
source

pub fn update_shielded_instance_config( &self, request: ShieldedInstanceConfig, project: &str, zone: &str, instance: &str ) -> InstanceUpdateShieldedInstanceConfigCall<'a, S>

Create a builder to help you perform the following task:

Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone for this request.
  • instance - Name or id of the instance scoping this request.

Trait Implementations§

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for InstanceMethods<'a, S>

§

impl<'a, S> Send for InstanceMethods<'a, S>
where S: Sync,

§

impl<'a, S> Sync for InstanceMethods<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for InstanceMethods<'a, S>

§

impl<'a, S> !UnwindSafe for InstanceMethods<'a, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more