INNER CODE UNIT · Rust
new
lemunozm/ruscii · src/app.rs:19
pub fn new() -> Config {
Config { fps: 30 }
}
/// Consumes the receiver [`Config`] and returns a new one with the maximum framerate to the
/// given `fps`.
pub fn fps(mut self, fps: u32) -> Config {
self.fps = fps;
self
}
}
impl Default for Config {
/// Constructs a [`Config`] with a default maximum framerate of 30.
fn default() -> Self {
Self { fps: 30 }
}
}