Skip to main content

FileGrouping

Trait FileGrouping 

Source
pub trait FileGrouping:
    Debug
    + Send
    + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn groups(&self, names: &[&str]) -> Vec<NameGroup>;

    // Provided method
    fn badge(&self, member: &str) -> String { ... }
}
Expand description

Which of a folder’s files go together: declared by the application, asked once per listing on the interface thread (the picker reads a folder there too), with names and nothing else, so that it reads no file.

Required Methods§

Source

fn id(&self) -> &str

Its id: registering another with this id replaces it.

Source

fn groups(&self, names: &[&str]) -> Vec<NameGroup>

The groups among these names: the folder’s files, without folders or hidden files. What makes no sense is ignored, and the file stays an entry of its own: a name that is not there, a member that is its own main, or a file an earlier group or grouping took.

Provided Methods§

Source

fn badge(&self, member: &str) -> String

What the entry’s badge says of a member (the picker adds the +): its extension in capitals, by default.

Implementors§