pub struct Router {
pub metadata: MetaData,
pub separation_context: SclName,
pub internal_ip_netmask: Ipv4Addr,
pub internal_ip: Ipv4Addr,
pub external_ip: Ipv4Addr,
pub status: RouterStatus,
pub forwarded_tcp_ports: Vec<ForwardedPort>,
pub forwarded_udp_ports: Vec<ForwardedPort>,
}Fields§
§metadata: MetaData§separation_context: SclNameParent SC of the Router.
internal_ip_netmask: Ipv4AddrIPv4 netmask of the internal_ip.
Cannot be updated.
internal_ip: Ipv4AddrUser specified IP address that will be assigned to the router specific gateway of the SC network namespace. Use this value as a gateway address inside SC VMs.
Cannot be updated.
external_ip: Ipv4AddrIP address that will be assigned by the SCL API.
Cannot be updated.
status: RouterStatusLatest status of the router.
Does not need to be specified by the user when creating (POST), as it is initialized with the default values.
forwarded_tcp_ports: Vec<ForwardedPort>Specifies which TCP ports of the external_ip should be forwarded
to which IP and port combination of the internal network.
Cannot be updated.
forwarded_udp_ports: Vec<ForwardedPort>Specifies which UDP ports of the external_ip should be forwarded
to which IP and port combination of the internal network.
Cannot be updated.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Router
impl<'de> Deserialize<'de> for Router
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Router
impl Ord for Router
Source§impl PartialOrd for Router
impl PartialOrd for Router
Source§impl SclObject for Router
impl SclObject for Router
Source§fn separation_context(&self) -> Option<&SclName>
fn separation_context(&self) -> Option<&SclName>
Returns the
SclName of the separation context if the SclObject is connected to one,
otherwise default None.Source§fn metadata(&self) -> &MetaData
fn metadata(&self) -> &MetaData
Providing access to
MetaData is essential for our optimistic concurrency control.Source§fn metadata_mut(&mut self) -> &mut MetaData
fn metadata_mut(&mut self) -> &mut MetaData
Providing access to
MetaData is essential for our optimistic concurrency control.Source§fn referenced_db_keys(&self) -> Vec<String>
fn referenced_db_keys(&self) -> Vec<String>
Returns all DB keys the object is referencing / depending on.
Source§fn validate_fields_before_create(&self) -> Result<()>
fn validate_fields_before_create(&self) -> Result<()>
Checks if all fields (except references to other SclObjects) are legal initial fields.
Should be called before a create operation.
Source§fn validate_fields_before_update(
current_db_state: &Self,
proposed_new_state: &Self,
) -> Result<()>
fn validate_fields_before_update( current_db_state: &Self, proposed_new_state: &Self, ) -> Result<()>
Checks if a proposed updated is valid. Should be called before a regular (not
related to finalizers / deletion) update operation.
fn uuid(&self) -> Uuid
Source§fn api_endpoint<'a>(
sc: impl Into<Option<&'a str>>,
name: impl Into<Option<&'a str>>,
) -> String
fn api_endpoint<'a>( sc: impl Into<Option<&'a str>>, name: impl Into<Option<&'a str>>, ) -> String
impl Eq for Router
impl StructuralPartialEq for 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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.