Closed qkzk closed 2 months ago
MSDN: History API
action after
history = A, B, C back : B (go(-1) -> A, go(0) -> B, go(1) -> C) - History = A, B, C visit: D => history = A, B, D
we need to know the index
#[derive(Default)] struct History { index: usize, visited: Vec<PB>, } impl History { pub fn back(&mut self) -> Option<PB>; pub fn forward(&mut self) -> Option<PB>; pub fn go(&mut self, rel: isize) -> Option<PB>; pub fn visite(&mut self, pb PB); }
MSDN: History API
action after
history = A, B, C back : B (go(-1) -> A, go(0) -> B, go(1) -> C) - History = A, B, C visit: D => history = A, B, D
we need to know the index