pub struct NetworkInterface {
pub id: Uuid,
pub ip: IpAddr,
pub kind: NetworkInterfaceKind,
pub mac: MacAddr,
pub name: Name,
pub primary: bool,
pub slot: u8,
pub subnet: IpNet,
pub transit_ips: Vec<IpNet>,
pub vni: Vni,
}Expand description
Information required to construct a virtual network interface
JSON schema
{
"description": "Information required to construct a virtual network
interface",
"type": "object",
"required": [
"id",
"ip",
"kind",
"mac",
"name",
"primary",
"slot",
"subnet",
"vni"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"ip": {
"type": "string",
"format": "ip"
},
"kind": {
"$ref": "#/components/schemas/NetworkInterfaceKind"
},
"mac": {
"$ref": "#/components/schemas/MacAddr"
},
"name": {
"$ref": "#/components/schemas/Name"
},
"primary": {
"type": "boolean"
},
"slot": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"subnet": {
"$ref": "#/components/schemas/IpNet"
},
"transit_ips": {
"default": [],
"type": "array",
"items": {
"$ref": "#/components/schemas/IpNet"
}
},
"vni": {
"$ref": "#/components/schemas/Vni"
}
}
}Fields§
§id: Uuid§ip: IpAddr§kind: NetworkInterfaceKind§mac: MacAddr§name: Name§primary: bool§slot: u8§subnet: IpNet§transit_ips: Vec<IpNet>§vni: VniImplementations§
Source§impl NetworkInterface
impl NetworkInterface
pub fn builder() -> NetworkInterface
Trait Implementations§
Source§impl Clone for NetworkInterface
impl Clone for NetworkInterface
Source§fn clone(&self) -> NetworkInterface
fn clone(&self) -> NetworkInterface
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 NetworkInterface
impl Debug for NetworkInterface
Source§impl<'de> Deserialize<'de> for NetworkInterface
impl<'de> Deserialize<'de> for NetworkInterface
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 From<&NetworkInterface> for NetworkInterface
impl From<&NetworkInterface> for NetworkInterface
Source§fn from(value: &NetworkInterface) -> Self
fn from(value: &NetworkInterface) -> Self
Converts to this type from the input type.
Source§impl From<NetworkInterface> for NetworkInterface
impl From<NetworkInterface> for NetworkInterface
Source§fn from(value: NetworkInterface) -> Self
fn from(value: NetworkInterface) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for NetworkInterface
impl JsonSchema for NetworkInterface
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for NetworkInterface
impl Serialize for NetworkInterface
Source§impl TryFrom<NetworkInterface> for NetworkInterface
impl TryFrom<NetworkInterface> for NetworkInterface
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: NetworkInterface) -> Result<Self, ConversionError>
fn try_from(value: NetworkInterface) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for NetworkInterface
impl RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl UnwindSafe for NetworkInterface
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