delta_data.rs 278 B

123456789101112
  1. use flowy_ot::core::Delta;
  2. #[derive(Debug)]
  3. pub struct DeltaData(pub Vec<u8>);
  4. impl DeltaData {
  5. pub fn parse(data: Vec<u8>) -> Result<DeltaData, String> {
  6. // let _ = Delta::from_bytes(data.clone()).map_err(|e| format!("{:?}", e))?;
  7. Ok(Self(data))
  8. }
  9. }