Skip to main content

RouterNat

Struct RouterNat 

Source
#[non_exhaustive]
pub struct RouterNat {
Show 22 fields pub auto_network_tier: Option<AutoNetworkTier>, pub drain_nat_ips: Vec<String>, pub enable_dynamic_port_allocation: Option<bool>, pub enable_endpoint_independent_mapping: Option<bool>, pub endpoint_types: Vec<EndpointTypes>, pub icmp_idle_timeout_sec: Option<i32>, pub log_config: Option<RouterNatLogConfig>, pub max_ports_per_vm: Option<i32>, pub min_ports_per_vm: Option<i32>, pub name: Option<String>, pub nat_64_subnetworks: Vec<RouterNatSubnetworkToNat64>, pub nat_ip_allocate_option: Option<NatIpAllocateOption>, pub nat_ips: Vec<String>, pub rules: Vec<RouterNatRule>, pub source_subnetwork_ip_ranges_to_nat: Option<SourceSubnetworkIpRangesToNat>, pub source_subnetwork_ip_ranges_to_nat_64: Option<SourceSubnetworkIpRangesToNat64>, pub subnetworks: Vec<RouterNatSubnetworkToNat>, pub tcp_established_idle_timeout_sec: Option<i32>, pub tcp_time_wait_timeout_sec: Option<i32>, pub tcp_transitory_idle_timeout_sec: Option<i32>, pub type: Option<Type>, pub udp_idle_timeout_sec: Option<i32>, /* private fields */
}
Available on crate feature routers only.
Expand description

Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§auto_network_tier: Option<AutoNetworkTier>

The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the current project-level default tier is used.

§drain_nat_ips: Vec<String>

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.

§enable_dynamic_port_allocation: Option<bool>

Enable Dynamic Port Allocation.

If not specified, it is disabled by default.

If set to true,

  • Dynamic Port Allocation will be enabled on this NAT config.
  • enableEndpointIndependentMapping cannot be set to true.
  • If minPorts is set, minPortsPerVm must be set to a power of two greater than or equal to 32. If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config.
§enable_endpoint_independent_mapping: Option<bool>§endpoint_types: Vec<EndpointTypes>

List of NAT-ted endpoint types supported by the Nat Gateway. If the list is empty, then it will be equivalent to include ENDPOINT_TYPE_VM

§icmp_idle_timeout_sec: Option<i32>

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

§log_config: Option<RouterNatLogConfig>

Configure logging on this NAT.

§max_ports_per_vm: Option<i32>

Maximum number of ports allocated to a VM from this NAT config when Dynamic Port Allocation is enabled.

If Dynamic Port Allocation is not enabled, this field has no effect.

If Dynamic Port Allocation is enabled, and this field is set, it must be set to a power of two greater than minPortsPerVm, or 64 if minPortsPerVm is not set.

If Dynamic Port Allocation is enabled and this field is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config.

§min_ports_per_vm: Option<i32>

Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.

§name: Option<String>

Unique name of this Nat service. The name must be 1-63 characters long and comply withRFC1035.

§nat_64_subnetworks: Vec<RouterNatSubnetworkToNat64>

List of Subnetwork resources whose traffic should be translated by NAT64 Gateway. It is used only when LIST_OF_IPV6_SUBNETWORKS is selected for the SubnetworkIpRangeToNat64Option above.

§nat_ip_allocate_option: Option<NatIpAllocateOption>

Specify the NatIpAllocateOption, which can take one of the following values:

  • MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs.
  • AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can’t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty.
§nat_ips: Vec<String>

A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.

§rules: Vec<RouterNatRule>

A list of rules associated with this NAT.

§source_subnetwork_ip_ranges_to_nat: Option<SourceSubnetworkIpRangesToNat>

Specify the Nat option, which can take one of the following values:

  • ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat.
  • ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat.
  • LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below)

The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not be any other Router.Nat section in any Router for this network in this region.

§source_subnetwork_ip_ranges_to_nat_64: Option<SourceSubnetworkIpRangesToNat64>

Specify the Nat option for NAT64, which can take one of the following values:

  • ALL_IPV6_SUBNETWORKS: All of the IP ranges in every Subnetwork are allowed to Nat.
  • LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field nat64_subnetwork below)

The default is NAT64_OPTION_UNSPECIFIED. Note that if this field contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section in this region can also enable NAT64 for any Subnetworks in this network. Other Router.Nat sections can still be present to enable NAT44 only.

§subnetworks: Vec<RouterNatSubnetworkToNat>

A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.

§tcp_established_idle_timeout_sec: Option<i32>

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

§tcp_time_wait_timeout_sec: Option<i32>

Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.

§tcp_transitory_idle_timeout_sec: Option<i32>

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

§type: Option<Type>

Indicates whether this NAT is used for public or private IP translation. If unspecified, it defaults to PUBLIC.

§udp_idle_timeout_sec: Option<i32>

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

Implementations§

Source§

impl RouterNat

Source

pub fn new() -> Self

Source

pub fn set_auto_network_tier<T>(self, v: T) -> Self

Sets the value of auto_network_tier.

§Example
use google_cloud_compute_v1::model::router_nat::AutoNetworkTier;
let x0 = RouterNat::new().set_auto_network_tier(AutoNetworkTier::Premium);
let x1 = RouterNat::new().set_auto_network_tier(AutoNetworkTier::Standard);
let x2 = RouterNat::new().set_auto_network_tier(AutoNetworkTier::StandardOverridesFixedStandard);
Source

pub fn set_or_clear_auto_network_tier<T>(self, v: Option<T>) -> Self

Sets or clears the value of auto_network_tier.

§Example
use google_cloud_compute_v1::model::router_nat::AutoNetworkTier;
let x0 = RouterNat::new().set_or_clear_auto_network_tier(Some(AutoNetworkTier::Premium));
let x1 = RouterNat::new().set_or_clear_auto_network_tier(Some(AutoNetworkTier::Standard));
let x2 = RouterNat::new().set_or_clear_auto_network_tier(Some(AutoNetworkTier::StandardOverridesFixedStandard));
let x_none = RouterNat::new().set_or_clear_auto_network_tier(None::<AutoNetworkTier>);
Source

pub fn set_drain_nat_ips<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of drain_nat_ips.

§Example
let x = RouterNat::new().set_drain_nat_ips(["a", "b", "c"]);
Source

pub fn set_enable_dynamic_port_allocation<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of enable_dynamic_port_allocation.

§Example
let x = RouterNat::new().set_enable_dynamic_port_allocation(true);
Source

pub fn set_or_clear_enable_dynamic_port_allocation<T>( self, v: Option<T>, ) -> Self
where T: Into<bool>,

Sets or clears the value of enable_dynamic_port_allocation.

§Example
let x = RouterNat::new().set_or_clear_enable_dynamic_port_allocation(Some(false));
let x = RouterNat::new().set_or_clear_enable_dynamic_port_allocation(None::<bool>);
Source

pub fn set_enable_endpoint_independent_mapping<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of enable_endpoint_independent_mapping.

§Example
let x = RouterNat::new().set_enable_endpoint_independent_mapping(true);
Source

pub fn set_or_clear_enable_endpoint_independent_mapping<T>( self, v: Option<T>, ) -> Self
where T: Into<bool>,

Sets or clears the value of enable_endpoint_independent_mapping.

§Example
let x = RouterNat::new().set_or_clear_enable_endpoint_independent_mapping(Some(false));
let x = RouterNat::new().set_or_clear_enable_endpoint_independent_mapping(None::<bool>);
Source

pub fn set_endpoint_types<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<EndpointTypes>,

Sets the value of endpoint_types.

§Example
use google_cloud_compute_v1::model::router_nat::EndpointTypes;
let x = RouterNat::new().set_endpoint_types([
    EndpointTypes::EndpointTypeSwg,
    EndpointTypes::EndpointTypeVm,
]);
Source

pub fn set_icmp_idle_timeout_sec<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of icmp_idle_timeout_sec.

§Example
let x = RouterNat::new().set_icmp_idle_timeout_sec(42);
Source

pub fn set_or_clear_icmp_idle_timeout_sec<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of icmp_idle_timeout_sec.

§Example
let x = RouterNat::new().set_or_clear_icmp_idle_timeout_sec(Some(42));
let x = RouterNat::new().set_or_clear_icmp_idle_timeout_sec(None::<i32>);
Source

pub fn set_log_config<T>(self, v: T) -> Self

Sets the value of log_config.

§Example
use google_cloud_compute_v1::model::RouterNatLogConfig;
let x = RouterNat::new().set_log_config(RouterNatLogConfig::default()/* use setters */);
Source

pub fn set_or_clear_log_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of log_config.

§Example
use google_cloud_compute_v1::model::RouterNatLogConfig;
let x = RouterNat::new().set_or_clear_log_config(Some(RouterNatLogConfig::default()/* use setters */));
let x = RouterNat::new().set_or_clear_log_config(None::<RouterNatLogConfig>);
Source

pub fn set_max_ports_per_vm<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of max_ports_per_vm.

§Example
let x = RouterNat::new().set_max_ports_per_vm(42);
Source

pub fn set_or_clear_max_ports_per_vm<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of max_ports_per_vm.

§Example
let x = RouterNat::new().set_or_clear_max_ports_per_vm(Some(42));
let x = RouterNat::new().set_or_clear_max_ports_per_vm(None::<i32>);
Source

pub fn set_min_ports_per_vm<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of min_ports_per_vm.

§Example
let x = RouterNat::new().set_min_ports_per_vm(42);
Source

pub fn set_or_clear_min_ports_per_vm<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of min_ports_per_vm.

§Example
let x = RouterNat::new().set_or_clear_min_ports_per_vm(Some(42));
let x = RouterNat::new().set_or_clear_min_ports_per_vm(None::<i32>);
Source

pub fn set_name<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of name.

§Example
let x = RouterNat::new().set_name("example");
Source

pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of name.

§Example
let x = RouterNat::new().set_or_clear_name(Some("example"));
let x = RouterNat::new().set_or_clear_name(None::<String>);
Source

pub fn set_nat_64_subnetworks<T, V>(self, v: T) -> Self

Sets the value of nat_64_subnetworks.

§Example
use google_cloud_compute_v1::model::RouterNatSubnetworkToNat64;
let x = RouterNat::new()
    .set_nat_64_subnetworks([
        RouterNatSubnetworkToNat64::default()/* use setters */,
        RouterNatSubnetworkToNat64::default()/* use (different) setters */,
    ]);
Source

pub fn set_nat_ip_allocate_option<T>(self, v: T) -> Self

Sets the value of nat_ip_allocate_option.

§Example
use google_cloud_compute_v1::model::router_nat::NatIpAllocateOption;
let x0 = RouterNat::new().set_nat_ip_allocate_option(NatIpAllocateOption::ManualOnly);
Source

pub fn set_or_clear_nat_ip_allocate_option<T>(self, v: Option<T>) -> Self

Sets or clears the value of nat_ip_allocate_option.

§Example
use google_cloud_compute_v1::model::router_nat::NatIpAllocateOption;
let x0 = RouterNat::new().set_or_clear_nat_ip_allocate_option(Some(NatIpAllocateOption::ManualOnly));
let x_none = RouterNat::new().set_or_clear_nat_ip_allocate_option(None::<NatIpAllocateOption>);
Source

pub fn set_nat_ips<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of nat_ips.

§Example
let x = RouterNat::new().set_nat_ips(["a", "b", "c"]);
Source

pub fn set_rules<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<RouterNatRule>,

Sets the value of rules.

§Example
use google_cloud_compute_v1::model::RouterNatRule;
let x = RouterNat::new()
    .set_rules([
        RouterNatRule::default()/* use setters */,
        RouterNatRule::default()/* use (different) setters */,
    ]);
Source

pub fn set_source_subnetwork_ip_ranges_to_nat<T>(self, v: T) -> Self

Sets the value of source_subnetwork_ip_ranges_to_nat.

§Example
use google_cloud_compute_v1::model::router_nat::SourceSubnetworkIpRangesToNat;
let x0 = RouterNat::new().set_source_subnetwork_ip_ranges_to_nat(SourceSubnetworkIpRangesToNat::AllSubnetworksAllPrimaryIpRanges);
let x1 = RouterNat::new().set_source_subnetwork_ip_ranges_to_nat(SourceSubnetworkIpRangesToNat::ListOfSubnetworks);
Source

pub fn set_or_clear_source_subnetwork_ip_ranges_to_nat<T>( self, v: Option<T>, ) -> Self

Sets or clears the value of source_subnetwork_ip_ranges_to_nat.

§Example
use google_cloud_compute_v1::model::router_nat::SourceSubnetworkIpRangesToNat;
let x0 = RouterNat::new().set_or_clear_source_subnetwork_ip_ranges_to_nat(Some(SourceSubnetworkIpRangesToNat::AllSubnetworksAllPrimaryIpRanges));
let x1 = RouterNat::new().set_or_clear_source_subnetwork_ip_ranges_to_nat(Some(SourceSubnetworkIpRangesToNat::ListOfSubnetworks));
let x_none = RouterNat::new().set_or_clear_source_subnetwork_ip_ranges_to_nat(None::<SourceSubnetworkIpRangesToNat>);
Source

pub fn set_source_subnetwork_ip_ranges_to_nat_64<T>(self, v: T) -> Self

Sets the value of source_subnetwork_ip_ranges_to_nat_64.

§Example
use google_cloud_compute_v1::model::router_nat::SourceSubnetworkIpRangesToNat64;
let x0 = RouterNat::new().set_source_subnetwork_ip_ranges_to_nat_64(SourceSubnetworkIpRangesToNat64::ListOfIpv6Subnetworks);
Source

pub fn set_or_clear_source_subnetwork_ip_ranges_to_nat_64<T>( self, v: Option<T>, ) -> Self

Sets or clears the value of source_subnetwork_ip_ranges_to_nat_64.

§Example
use google_cloud_compute_v1::model::router_nat::SourceSubnetworkIpRangesToNat64;
let x0 = RouterNat::new().set_or_clear_source_subnetwork_ip_ranges_to_nat_64(Some(SourceSubnetworkIpRangesToNat64::ListOfIpv6Subnetworks));
let x_none = RouterNat::new().set_or_clear_source_subnetwork_ip_ranges_to_nat_64(None::<SourceSubnetworkIpRangesToNat64>);
Source

pub fn set_subnetworks<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<RouterNatSubnetworkToNat>,

Sets the value of subnetworks.

§Example
use google_cloud_compute_v1::model::RouterNatSubnetworkToNat;
let x = RouterNat::new()
    .set_subnetworks([
        RouterNatSubnetworkToNat::default()/* use setters */,
        RouterNatSubnetworkToNat::default()/* use (different) setters */,
    ]);
Source

pub fn set_tcp_established_idle_timeout_sec<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of tcp_established_idle_timeout_sec.

§Example
let x = RouterNat::new().set_tcp_established_idle_timeout_sec(42);
Source

pub fn set_or_clear_tcp_established_idle_timeout_sec<T>( self, v: Option<T>, ) -> Self
where T: Into<i32>,

Sets or clears the value of tcp_established_idle_timeout_sec.

§Example
let x = RouterNat::new().set_or_clear_tcp_established_idle_timeout_sec(Some(42));
let x = RouterNat::new().set_or_clear_tcp_established_idle_timeout_sec(None::<i32>);
Source

pub fn set_tcp_time_wait_timeout_sec<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of tcp_time_wait_timeout_sec.

§Example
let x = RouterNat::new().set_tcp_time_wait_timeout_sec(42);
Source

pub fn set_or_clear_tcp_time_wait_timeout_sec<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of tcp_time_wait_timeout_sec.

§Example
let x = RouterNat::new().set_or_clear_tcp_time_wait_timeout_sec(Some(42));
let x = RouterNat::new().set_or_clear_tcp_time_wait_timeout_sec(None::<i32>);
Source

pub fn set_tcp_transitory_idle_timeout_sec<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of tcp_transitory_idle_timeout_sec.

§Example
let x = RouterNat::new().set_tcp_transitory_idle_timeout_sec(42);
Source

pub fn set_or_clear_tcp_transitory_idle_timeout_sec<T>( self, v: Option<T>, ) -> Self
where T: Into<i32>,

Sets or clears the value of tcp_transitory_idle_timeout_sec.

§Example
let x = RouterNat::new().set_or_clear_tcp_transitory_idle_timeout_sec(Some(42));
let x = RouterNat::new().set_or_clear_tcp_transitory_idle_timeout_sec(None::<i32>);
Source

pub fn set_type<T>(self, v: T) -> Self
where T: Into<Type>,

Sets the value of r#type.

§Example
use google_cloud_compute_v1::model::router_nat::Type;
let x0 = RouterNat::new().set_type(Type::Public);
Source

pub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
where T: Into<Type>,

Sets or clears the value of r#type.

§Example
use google_cloud_compute_v1::model::router_nat::Type;
let x0 = RouterNat::new().set_or_clear_type(Some(Type::Public));
let x_none = RouterNat::new().set_or_clear_type(None::<Type>);
Source

pub fn set_udp_idle_timeout_sec<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of udp_idle_timeout_sec.

§Example
let x = RouterNat::new().set_udp_idle_timeout_sec(42);
Source

pub fn set_or_clear_udp_idle_timeout_sec<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of udp_idle_timeout_sec.

§Example
let x = RouterNat::new().set_or_clear_udp_idle_timeout_sec(Some(42));
let x = RouterNat::new().set_or_clear_udp_idle_timeout_sec(None::<i32>);

Trait Implementations§

Source§

impl Clone for RouterNat

Source§

fn clone(&self) -> RouterNat

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RouterNat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RouterNat

Source§

fn default() -> RouterNat

Returns the “default value” for a type. Read more
Source§

impl Message for RouterNat

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for RouterNat

Source§

fn eq(&self, other: &RouterNat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RouterNat

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

Source§

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>,

Source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,