#[non_exhaustive]pub struct Destination {
pub port: i32,
pub destination: Option<Destination>,
/* private fields */
}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.port: i32The port is the target port number that is accepted by the destination.
destination: Option<Destination>Implementations§
Source§impl Destination
impl Destination
pub fn new() -> Self
Sourcepub fn set_destination<T: Into<Option<Destination>>>(self, v: T) -> Self
pub fn set_destination<T: Into<Option<Destination>>>(self, v: T) -> Self
Sets the value of destination.
Note that all the setters affecting destination are mutually
exclusive.
§Example
ⓘ
use google_cloud_connectors_v1::model::destination::Destination as DestinationOneOf;
let x = Destination::new().set_destination(Some(DestinationOneOf::ServiceAttachment("example".to_string())));Sourcepub fn service_attachment(&self) -> Option<&String>
pub fn service_attachment(&self) -> Option<&String>
The value of destination
if it holds a ServiceAttachment, None if the field is not set or
holds a different branch.
Sourcepub fn set_service_attachment<T: Into<String>>(self, v: T) -> Self
pub fn set_service_attachment<T: Into<String>>(self, v: T) -> Self
Sets the value of destination
to hold a ServiceAttachment.
Note that all the setters affecting destination are
mutually exclusive.
§Example
ⓘ
let x = Destination::new().set_service_attachment("example");
assert!(x.service_attachment().is_some());
assert!(x.host().is_none());Sourcepub fn host(&self) -> Option<&String>
pub fn host(&self) -> Option<&String>
The value of destination
if it holds a Host, None if the field is not set or
holds a different branch.
Sourcepub fn set_host<T: Into<String>>(self, v: T) -> Self
pub fn set_host<T: Into<String>>(self, v: T) -> Self
Sets the value of destination
to hold a Host.
Note that all the setters affecting destination are
mutually exclusive.
§Example
ⓘ
let x = Destination::new().set_host("example");
assert!(x.host().is_some());
assert!(x.service_attachment().is_none());Trait Implementations§
Source§impl Clone for Destination
impl Clone for Destination
Source§fn clone(&self) -> Destination
fn clone(&self) -> Destination
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 Destination
impl Debug for Destination
Source§impl Default for Destination
impl Default for Destination
Source§fn default() -> Destination
fn default() -> Destination
Returns the “default value” for a type. Read more
Source§impl Message for Destination
impl Message for Destination
Source§impl PartialEq for Destination
impl PartialEq for Destination
impl StructuralPartialEq for Destination
Auto Trait Implementations§
impl Freeze for Destination
impl RefUnwindSafe for Destination
impl Send for Destination
impl Sync for Destination
impl Unpin for Destination
impl UnsafeUnpin for Destination
impl UnwindSafe for Destination
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