pub async fn snapshot(&self, index: u64, snapshot: &[u8]) -> Result<()> {
        {
            let mut raft = self.inner.lock().unwrap();
            raft.snapshot(index, snapshot);
        }
        self.persist().await.expect("failed to persist");
        Ok(())
    }
/// The service says it has created a snapshot that has all info up to and
/// including index. This means the service no longer needs the log through
/// (and including) that index. Raft should now trim its log as much as
/// possible.
The service says it has created a snapshot that has all info up to and
including index. This means the service no longer needs the log through
(and including) that index. Raft should now trim its log as much as
possible.
The service says it has created a snapshot that has all info up to and including index . This means the service no longer needs the log through ( and including ) that index . Raft should now trim its log as much as possible .
pub async fn snapshot(&self, index: u64, snapshot: &[u8]) -> Result<()> {
        {
            let mut raft = self.inner.lock().unwrap();
            raft.snapshot(index, snapshot);
        }
        self.persist().await.expect("failed to persist");
        Ok(())
    }
pub async fn snapshot ( & self , index : u64 , snapshot : & [ u8 ] ) -> Result < ( ) > { { let mut raft = self . inner . lock ( ) . unwrap ( ) ; raft . snapshot ( index , snapshot ) ; } self . persist ( ) . await . expect ( " " ) ; Ok ( ( ) ) }
The service says it has created a snapshot that has all info up to and
including index.
The service says it has created a snapshot that has all info up to and including index .
&self
index
u64
snapshot
&[u8]
&self
index
u64
snapshot
&[u8]