pub struct CniConfig {
pub cni_version: String,
pub name: String,
pub type_name: String,
pub bridge: String,
pub subnet: String,
pub gateway: String,
pub options: BTreeMap<String, String>,
}Expand description
CNI plugin configuration.
Fields§
§cni_version: StringCNI specification version.
name: StringNetwork name.
type_name: StringPlugin type name.
bridge: StringBridge device name (for bridge plugin).
subnet: StringSubnet in CIDR notation (e.g., “10.244.0.0/24”).
gateway: StringGateway address (e.g., “10.244.0.1”).
options: BTreeMap<String, String>Additional plugin-specific options.
Implementations§
Source§impl CniConfig
impl CniConfig
Sourcepub fn from_key_value(input: &str) -> Self
pub fn from_key_value(input: &str) -> Self
Parse a CNI config from a simple key=value format.
Each line is key=value. Recognized keys:
cniVersion, name, type, bridge, subnet, gateway.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CniConfig
impl RefUnwindSafe for CniConfig
impl Send for CniConfig
impl Sync for CniConfig
impl Unpin for CniConfig
impl UnwindSafe for CniConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)