Router

Struct Router 

Source
pub struct Router { /* private fields */ }
Expand description

Structure representing a single router.

Implementations§

Source§

impl Router

Source

pub fn admin_state_up(&self) -> bool

The administrative state of the router.

Source

pub fn set_admin_state_up(&mut self, value: bool)

Set the administrative state of the router.

Source

pub fn with_admin_state_up(self, value: bool) -> Self

Set the administrative state of the router.

Source

pub fn availability_zone_hints(&self) -> &Vec<String>

Availability zone candidates for the router

Source

pub fn availability_zones(&self) -> &Vec<String>

The availability zones for the router (if available).

Source

pub fn conntrack_helpers(&self) -> &Vec<ConntrackHelper>

The associated conntrack helper resources for the router.

Source

pub fn created_at(&self) -> Option<DateTime<FixedOffset>>

Creation data and time (if available).

Source

pub fn description(&self) -> &Option<String>

Router description.

Source

pub fn set_description<S: Into<String>>(&mut self, value: S)

Update the description.

Source

pub fn with_description<S: Into<String>>(self, value: S) -> Self

Update the description.

Source

pub fn distributed(&self) -> Option<bool>

Indicates if the router is distributed.

Source

pub fn set_distributed(&mut self, value: bool)

Update whether this is a distributed router.

Source

pub fn with_distributed(self, value: bool) -> Self

Update whether this is a distributed router.

Source

pub fn external_gateway(&self) -> &Option<ExternalGateway>

External gateway information.

Source

pub async fn external_network(&self) -> Result<Network>

Get external network associated with this router.

Fails if external gateway information is not provided.

Source

pub fn set_external_gateway(&mut self, value: ExternalGateway)

Update the external gateway information.

Source

pub fn with_external_gateway(self, value: ExternalGateway) -> Self

Update the external gateway information.

Source

pub fn flavor_id(&self) -> &Option<String>

Flavor associated with router.

Source

pub fn ha(&self) -> Option<bool>

Indicates if the router is highly-available.

Source

pub fn set_ha(&mut self, value: bool)

Update whether this is a highly-available router.

Source

pub fn with_ha(self, value: bool) -> Self

Update whether this is a highly-available router.

Source

pub fn id(&self) -> &String

Unique ID.

Source

pub fn name(&self) -> &Option<String>

Router name.

Source

pub fn set_name<S: Into<String>>(&mut self, value: S)

Update the name.

Source

pub fn with_name<S: Into<String>>(self, value: S) -> Self

Update the name.

Source

pub fn project_id(&self) -> &Option<String>

Project ID.

Source

pub fn revision_number(&self) -> Option<u32>

Revision number.

Source

pub fn routes(&self) -> &Option<Vec<HostRoute>>

Extra routes.

Source

pub fn set_routes(&mut self, value: Vec<HostRoute>)

Update extra routes.

Source

pub fn with_routes(self, value: Vec<HostRoute>) -> Self

Update extra routes.

Source

pub fn service_type_id(&self) -> &Option<String>

ID of the service type associated to the router.

Source

pub fn status(&self) -> RouterStatus

Status of the router.

Source

pub fn tags(&self) -> &Option<Vec<String>>

Tags.

Source

pub fn updated_at(&self) -> Option<DateTime<FixedOffset>>

Last update data and time (if available).

Source

pub async fn delete(self) -> Result<DeletionWaiter<Router>>

Delete the router.

Source

pub fn is_dirty(&self) -> bool

Whether the router is modified.

Source

pub async fn save(&mut self) -> Result<()>

Save the changes to the router.

Source

pub async fn add_router_interface( &mut self, subnet_id: Option<&String>, port_id: Option<&String>, ) -> Result<()>

Add an interface to the router.

Source

pub async fn remove_router_interface( &mut self, subnet_id: Option<&String>, port_id: Option<&String>, ) -> Result<()>

Remove an interface from the router.

Source

pub async fn add_extra_routes(&mut self, routes: Vec<HostRoute>) -> Result<()>

Add route to router.

Source

pub async fn remove_extra_routes( &mut self, routes: Vec<HostRoute>, ) -> Result<()>

Remove route from router.

Trait Implementations§

Source§

impl Clone for Router

Source§

fn clone(&self) -> Router

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 Router

Source§

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

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

impl From<Router> for RouterRef

Source§

fn from(value: Router) -> RouterRef

Converts to this type from the input type.
Source§

impl Refresh for Router

Source§

fn refresh<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Refresh the router.

Auto Trait Implementations§

§

impl Freeze for Router

§

impl !RefUnwindSafe for Router

§

impl Send for Router

§

impl Sync for Router

§

impl Unpin for Router

§

impl !UnwindSafe for Router

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