pub struct ServiceEndpointSpecPortBuilder<___State = __ServiceEndpointSpecPortBuilderInitialState> { /* private fields */ }
Expand description

Use builder syntax to set the required parameters and finish by calling the method Self::build_struct().

Implementations§

source§

impl<__Name, __Protocol, __PublishMode, __PublishedPort, __TargetPort> ServiceEndpointSpecPortBuilder<(__Name, __Protocol, __PublishMode, __PublishedPort, __TargetPort)>

source

pub fn build_struct(self) -> ServiceEndpointSpecPort
where __Name: IntoSet<Option<Box<Option<String>>>, ServiceEndpointSpecPortBuilder__name>, __Protocol: IntoSet<Option<Box<Option<String>>>, ServiceEndpointSpecPortBuilder__protocol>, __PublishMode: IntoSet<Option<Box<Option<String>>>, ServiceEndpointSpecPortBuilder__publish_mode>, __PublishedPort: IntoSet<Option<Box<Option<i32>>>, ServiceEndpointSpecPortBuilder__published_port>, __TargetPort: IntoSet<Box<i32>, ServiceEndpointSpecPortBuilder__target_port>,

Finishes building and returns the requested object.

source

pub fn maybe_name( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::Name
where __Name: IsUnset,

Same as [Self::r#name], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn name( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::Name
where __Name: IsUnset,

A random name for the port

source

pub fn maybe_protocol( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::Protocol
where __Protocol: IsUnset,

Same as [Self::r#protocol], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn protocol( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::Protocol
where __Protocol: IsUnset,

Rrepresents the protocol of a port: tcp, udp or sctp. Defaults to tcp.

source

pub fn maybe_publish_mode( self, value: Option<impl Into<Box<Option<String>>>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::PublishMode
where __PublishMode: IsUnset,

Same as [Self::r#publish_mode], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn publish_mode( self, value: impl Into<Box<Option<String>>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::PublishMode
where __PublishMode: IsUnset,

Represents the mode in which the port is to be published: ‘ingress’ or ‘host’. Defaults to ingress.

source

pub fn maybe_published_port( self, value: Option<impl Into<Box<Option<i32>>>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::PublishedPort
where __PublishedPort: IsUnset,

Same as [Self::r#published_port], but accepts an Option as input. See that method’s documentation for more details.

source

pub fn published_port( self, value: impl Into<Box<Option<i32>>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::PublishedPort
where __PublishedPort: IsUnset,

The port on the swarm hosts

source

pub fn target_port( self, value: impl Into<Box<i32>>, ) -> <Self as __ServiceEndpointSpecPortBuilderSetMember>::TargetPort
where __TargetPort: IsUnset,

The port inside the container

Auto Trait Implementations§

§

impl<___State> Freeze for ServiceEndpointSpecPortBuilder<___State>
where ___State: Freeze,

§

impl<___State> RefUnwindSafe for ServiceEndpointSpecPortBuilder<___State>
where ___State: RefUnwindSafe,

§

impl<___State> Send for ServiceEndpointSpecPortBuilder<___State>
where ___State: Send,

§

impl<___State> Sync for ServiceEndpointSpecPortBuilder<___State>
where ___State: Sync,

§

impl<___State> Unpin for ServiceEndpointSpecPortBuilder<___State>
where ___State: Unpin,

§

impl<___State> UnwindSafe for ServiceEndpointSpecPortBuilder<___State>
where ___State: UnwindSafe,

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