pub struct Change {
pub id: Uuid,
pub timestamp: DateTime<Utc>,
pub change_type: ChangeType,
pub path: PathBuf,
pub old_path: Option<PathBuf>,
pub content_before: Option<Vec<u8>>,
pub content_after: Option<Vec<u8>>,
pub content_hash_before: Option<String>,
pub content_hash_after: Option<String>,
pub agent_id: Option<String>,
pub metadata: HashMap<String, String>,
pub session_id: Uuid,
}Fields§
§id: Uuid§timestamp: DateTime<Utc>§change_type: ChangeType§path: PathBuf§old_path: Option<PathBuf>§content_before: Option<Vec<u8>>§content_after: Option<Vec<u8>>§content_hash_before: Option<String>§content_hash_after: Option<String>§agent_id: Option<String>§metadata: HashMap<String, String>§session_id: UuidImplementations§
Source§impl Change
impl Change
pub fn new(change_type: ChangeType, path: PathBuf, session_id: Uuid) -> Self
pub fn with_content_before(self, content: Vec<u8>) -> Self
pub fn with_content_after(self, content: Vec<u8>) -> Self
pub fn with_agent_id(self, agent_id: String) -> Self
pub fn with_metadata(self, key: String, value: String) -> Self
pub fn with_old_path(self, old_path: PathBuf) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Change
impl<'de> Deserialize<'de> for Change
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnwindSafe for Change
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