pub struct GitentClient { /* private fields */ }Implementations§
Source§impl GitentClient
impl GitentClient
Sourcepub fn new(base_url: impl Into<String>, agent_id: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>, agent_id: impl Into<String>) -> Self
Create a new gitent client
§Arguments
base_url- Base URL of the gitent server (e.g., “http://localhost:3030”)agent_id- Unique identifier for this agent
Sourcepub fn file_created(&self, path: &str, content: &str) -> Result<()>
pub fn file_created(&self, path: &str, content: &str) -> Result<()>
Announce that a file was created
Sourcepub fn file_modified(
&self,
path: &str,
content_before: &str,
content_after: &str,
) -> Result<()>
pub fn file_modified( &self, path: &str, content_before: &str, content_after: &str, ) -> Result<()>
Announce that a file was modified
Sourcepub fn file_written(
&self,
path: &str,
content: &str,
previous_content: Option<&str>,
) -> Result<()>
pub fn file_written( &self, path: &str, content: &str, previous_content: Option<&str>, ) -> Result<()>
Announce that a file was written (create or modify)
Sourcepub fn file_deleted(
&self,
path: &str,
content_before: Option<&str>,
) -> Result<()>
pub fn file_deleted( &self, path: &str, content_before: Option<&str>, ) -> Result<()>
Announce that a file was deleted
Sourcepub fn get_uncommitted_changes(&self) -> Result<Vec<HashMap<String, Value>>>
pub fn get_uncommitted_changes(&self) -> Result<Vec<HashMap<String, Value>>>
Get all uncommitted changes
Sourcepub fn health_check(&self) -> Result<bool>
pub fn health_check(&self) -> Result<bool>
Check server health
Trait Implementations§
Source§impl Clone for GitentClient
impl Clone for GitentClient
Source§fn clone(&self) -> GitentClient
fn clone(&self) -> GitentClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GitentClient
impl !RefUnwindSafe for GitentClient
impl Send for GitentClient
impl Sync for GitentClient
impl Unpin for GitentClient
impl !UnwindSafe for GitentClient
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