#[non_exhaustive]pub struct NetworkEndpoint {
pub ip_address: String,
pub port: i32,
pub access_config: Option<AccessConfig>,
/* private fields */
}Expand description
A network endpoint over which a TPU worker can be reached.
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.ip_address: StringThe internal IP address of this network endpoint.
port: i32The port of this network endpoint.
access_config: Option<AccessConfig>The access config for the TPU worker.
Implementations§
Source§impl NetworkEndpoint
impl NetworkEndpoint
pub fn new() -> Self
Sourcepub fn set_ip_address<T: Into<String>>(self, v: T) -> Self
pub fn set_ip_address<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_access_config<T>(self, v: T) -> Selfwhere
T: Into<AccessConfig>,
pub fn set_access_config<T>(self, v: T) -> Selfwhere
T: Into<AccessConfig>,
Sets the value of access_config.
§Example
ⓘ
use google_cloud_tpu_v2::model::AccessConfig;
let x = NetworkEndpoint::new().set_access_config(AccessConfig::default()/* use setters */);Sourcepub fn set_or_clear_access_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<AccessConfig>,
pub fn set_or_clear_access_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<AccessConfig>,
Sets or clears the value of access_config.
§Example
ⓘ
use google_cloud_tpu_v2::model::AccessConfig;
let x = NetworkEndpoint::new().set_or_clear_access_config(Some(AccessConfig::default()/* use setters */));
let x = NetworkEndpoint::new().set_or_clear_access_config(None::<AccessConfig>);Trait Implementations§
Source§impl Clone for NetworkEndpoint
impl Clone for NetworkEndpoint
Source§fn clone(&self) -> NetworkEndpoint
fn clone(&self) -> NetworkEndpoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NetworkEndpoint
impl Debug for NetworkEndpoint
Source§impl Default for NetworkEndpoint
impl Default for NetworkEndpoint
Source§fn default() -> NetworkEndpoint
fn default() -> NetworkEndpoint
Returns the “default value” for a type. Read more
Source§impl Message for NetworkEndpoint
impl Message for NetworkEndpoint
Source§impl PartialEq for NetworkEndpoint
impl PartialEq for NetworkEndpoint
impl StructuralPartialEq for NetworkEndpoint
Auto Trait Implementations§
impl Freeze for NetworkEndpoint
impl RefUnwindSafe for NetworkEndpoint
impl Send for NetworkEndpoint
impl Sync for NetworkEndpoint
impl Unpin for NetworkEndpoint
impl UnsafeUnpin for NetworkEndpoint
impl UnwindSafe for NetworkEndpoint
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