pub struct KeyList<TRES: TimingResolution + Clone, PRES: ProgressResolution + Eq> { /* private fields */ }Expand description
List of Progress is stored by ID. Each specific ID has a specific timing and different progress.
Implementations§
Source§impl<TRES: TimingResolution + Clone, PRES: ProgressResolution + Eq> KeyList<TRES, PRES>
impl<TRES: TimingResolution + Clone, PRES: ProgressResolution + Eq> KeyList<TRES, PRES>
pub fn get_progresses(&self) -> &BTreeMap<u32, ProgressList<TRES, PRES>>
pub fn new(id: u32, time: TRES) -> Self
Sourcepub fn new_iter(iter: impl Iterator<Item = (u32, TRES)>) -> Self
pub fn new_iter(iter: impl Iterator<Item = (u32, TRES)>) -> Self
Create new with Iterator like [(3,1000), (4,2000)] (id, timing)
Sourcepub fn replace_id_iter(&mut self, iter: impl Iterator<Item = (u32, TRES)>)
pub fn replace_id_iter(&mut self, iter: impl Iterator<Item = (u32, TRES)>)
replace and add new id same as new but replace existing iterator id. non-same id will stay.
pub fn set_time(&mut self, id: u32, time: TRES)
pub fn new_id(&mut self, id: u32, time: TRES)
pub fn change_timing(&mut self, id: u32, new_timing: TRES)
pub fn iter_mut( &mut self, ) -> impl Iterator<Item = (&u32, &mut ProgressList<TRES, PRES>)>
pub fn get(&self, id: u32) -> Option<&ProgressList<TRES, PRES>>
pub fn get_mut(&mut self, id: u32) -> Option<&mut ProgressList<TRES, PRES>>
Sourcepub fn start_animation(&mut self, id: u32)
pub fn start_animation(&mut self, id: u32)
function to start animation.
pub fn get_progress_f32(&mut self, id: u32) -> f32
Trait Implementations§
Source§impl<TRES: TimingResolution + Clone, PRES: ProgressResolution + Eq> Default for KeyList<TRES, PRES>
Available on crate features std or alloc only.
impl<TRES: TimingResolution + Clone, PRES: ProgressResolution + Eq> Default for KeyList<TRES, PRES>
Available on crate features
std or alloc only.Source§impl<TRES: TimingResolution + Clone, PRES: ProgressResolution + Eq, const N: usize> From<[TRES; N]> for KeyList<TRES, PRES>
Available on crate features std or alloc only.
impl<TRES: TimingResolution + Clone, PRES: ProgressResolution + Eq, const N: usize> From<[TRES; N]> for KeyList<TRES, PRES>
Available on crate features
std or alloc only.Auto Trait Implementations§
impl<TRES, PRES> Freeze for KeyList<TRES, PRES>
impl<TRES, PRES> RefUnwindSafe for KeyList<TRES, PRES>where
TRES: RefUnwindSafe,
PRES: RefUnwindSafe,
impl<TRES, PRES> Send for KeyList<TRES, PRES>
impl<TRES, PRES> Sync for KeyList<TRES, PRES>
impl<TRES, PRES> Unpin for KeyList<TRES, PRES>
impl<TRES, PRES> UnwindSafe for KeyList<TRES, PRES>where
TRES: RefUnwindSafe,
PRES: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more