pub struct ReadSpeed {
pub words_per_minute: f64,
pub seconds_per_image: f64,
pub seconds_per_code_block: f64,
pub count_emoji: bool,
pub chinese: bool,
}Expand description
阅读速度配置
Fields§
§words_per_minute: f64每分钟阅读单词数(默认:200)
seconds_per_image: f64每张图片额外时间(秒,默认:12)
seconds_per_code_block: f64每个代码块额外时间(秒,默认:20)
count_emoji: bool是否考虑emoji(默认:true)
chinese: bool是否中文
Implementations§
Source§impl ReadSpeed
impl ReadSpeed
pub fn new( wpm: f64, seconds_per_image: f64, seconds_per_code_block: f64, count_emoji: bool, chinese: bool, ) -> Self
pub fn wpm(self, wpm: f64) -> Self
pub fn image_time(self, seconds: f64) -> Self
pub fn code_block_time(self, seconds: f64) -> Self
pub fn emoji(self, count: bool) -> Self
pub fn chinese(self, is_chinese: bool) -> Self
Trait Implementations§
impl Copy for ReadSpeed
Auto Trait Implementations§
impl Freeze for ReadSpeed
impl RefUnwindSafe for ReadSpeed
impl Send for ReadSpeed
impl Sync for ReadSpeed
impl Unpin for ReadSpeed
impl UnwindSafe for ReadSpeed
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)