INNER CODE UNIT · Rust

new

kubie-org/kubie · src/kubeconfig.rs:60

    pub fn new(source: &Rc<PathBuf>, item: T) -> Self {
        Sourced {
            source: source.clone(),
            item,
        }
    }
}

#[derive(Debug)]
pub struct Installed {
    pub clusters: Vec<Sourced<NamedCluster>>,
    pub users: Vec<Sourced<NamedUser>>,
    pub contexts: Vec<Sourced<NamedContext>>,
}

impl KubeConfig {
    pub fn write_to_file(&self, path: &Path) -> anyhow::Result<()> {
        let file = File::create(path).context("could not write file")?;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…