Skip to main content

ClipVariant

Trait ClipVariant 

Source
pub trait ClipVariant:
    Copy
    + Ord
    + Default
    + Debug
    + DeserializeOwned
    + 'static {
    // Required methods
    fn suffix(self) -> &'static str;
    fn split() -> &'static [Self];

    // Provided methods
    fn is_only(self) -> bool { ... }
    fn variants() -> Vec<Self> { ... }
    fn incomplete(line: &str) -> String { ... }
    fn mixed(line: &str) -> String { ... }
}
Expand description

Which recording of a line a clip is: the game’s type, with its default for a line’s only clip.

Required Methods§

Source

fn suffix(self) -> &'static str

What goes between the line id and .ogg in the file name: nothing for the default, .m for a variant M, say.

Source

fn split() -> &'static [Self]

The variants that go together, every one of them or none: the clips of a line whose words change.

Provided Methods§

Source

fn is_only(self) -> bool

Whether this is the default: the line’s only clip.

Source

fn variants() -> Vec<Self>

Every variant a clip may be: the default and the split ones. A game with other variants too lists them all.

Source

fn incomplete(line: &str) -> String

What a line with some of the split variants but not all is told.

Source

fn mixed(line: &str) -> String

What a line with its only clip and split ones too is told.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ClipVariant for ()

No voices: a line has only its only clip ((), as the engine says “none” elsewhere).

Source§

fn suffix(self) -> &'static str

Source§

fn split() -> &'static [Self]

Implementors§