Trait ServicePortExt

Source
pub trait ServicePortExt {
    // Required methods
    fn new(name: impl ToString, port: i32) -> Self;
    fn target_port(self, port: impl ToIntOrString) -> Self;
    fn protocol(self, protocol: impl ToString) -> Self;

    // Provided methods
    fn udp(name: impl ToString, port: i32) -> Self
       where Self: Sized { ... }
    fn sctp(name: impl ToString, port: i32) -> Self
       where Self: Sized { ... }
}

Required Methods§

Source

fn new(name: impl ToString, port: i32) -> Self

Construct new ServicePort

Source

fn target_port(self, port: impl ToIntOrString) -> Self

Set targetPort

Source

fn protocol(self, protocol: impl ToString) -> Self

Set protocol

Provided Methods§

Source

fn udp(name: impl ToString, port: i32) -> Self
where Self: Sized,

Create UDP ServicePort

Source

fn sctp(name: impl ToString, port: i32) -> Self
where Self: Sized,

Create SCTP ServicePort

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§