cni-plugin 0.2.1

Framework to implement CNI (container networking) plugins in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::{convert::Infallible, env::split_paths, path::PathBuf, str::FromStr};

#[derive(Clone, Debug, Default)]
pub(crate) struct CniPath(pub Vec<PathBuf>);

impl FromStr for CniPath {
	type Err = Infallible;

	fn from_str(s: &str) -> Result<Self, Self::Err> {
		Ok(Self(split_paths(s).map(PathBuf::from).collect()))
	}
}