You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: count.rs
    path of file: ./repos/erdtree/src/tree
    
    the code of the file until where you have to start completion: use super::Node;
use std::{
    convert::From,
    fmt::{self, Display},
    ops::{Add, AddAssign},
};

/// For keeping track of the number of various file-types of [Node]'s chlidren.
#[allow(clippy::module_name_repetitions)]
#[derive(Default)]
pub struct FileCount {
    pub num_dirs: usize,
    pub num_files: usize,
    pub num_links: usize,
}

impl AddAssign<&Node> for FileCount {
    /// Update [Self] with information from [Node].
    fn add_assign(&mut self, rhs: &Node) {
        if rhs.is_dir() {
            self.num_dirs += 1;
        } else if rhs.is_symlink() {
            self.num_links += 1;
        } else
    
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let mut components = vec![];

        if self.num_dirs > 0 {
            let output = format!(
                "{} {}",
                self.num_dirs,
                if self.num_dirs > 1 {
                    "directories"
                } else {
                    "directory"
                }
            );

            components.push(output);
        }

        if self.num_files > 0 {
            let output = format!(
                "{} {}",
                self.num_files,
                if self.num_files > 1 { "files" } else { "file" }
            );

            components.push(output);
        }

        if self.num_links > 0 {
            let output = format!(
                "{} {}",
                self.num_links,
                if self.num_links > 1 { "links" } else { "link" }
            );

            components.push(output);
        }

        write!(f, "{}", components.join(", "))
    }