pub struct SessionState { /* private fields */ }Expand description
包装任意 State,对带 session 头的写命令做去重。
Implementations§
Trait Implementations§
Source§impl State for SessionState
impl State for SessionState
Source§fn get_applied_index(&self) -> Index
fn get_applied_index(&self) -> Index
返回状态机中最后已应用的日志索引。
Auto Trait Implementations§
impl !RefUnwindSafe for SessionState
impl !Sync for SessionState
impl !UnwindSafe for SessionState
impl Freeze for SessionState
impl Send for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more