pub struct MappingStore { /* private fields */ }
Implementations§
Source§impl MappingStore
impl MappingStore
pub async fn new<P: AsRef<Path>>(db_path: P) -> Result<Self>
pub async fn store_mapping(&self, mapping: TaskMapping) -> Result<()>
pub async fn get_mapping_by_linear_id( &self, sync_source: &str, linear_issue_id: &str, ) -> Result<Option<TaskMapping>>
pub async fn get_mapping_by_motion_id( &self, motion_task_id: &str, ) -> Result<Option<TaskMapping>>
pub async fn remove_mapping( &self, sync_source: &str, linear_issue_id: &str, ) -> Result<Option<TaskMapping>>
pub async fn list_mappings_by_source( &self, sync_source: &str, ) -> Result<Vec<TaskMapping>>
pub async fn list_all_mappings(&self) -> Result<Vec<TaskMapping>>
pub async fn update_mapping(&self, mapping: TaskMapping) -> Result<()>
Sourcepub async fn create_pending_mapping(
&self,
sync_source: &str,
issue: &LinearIssue,
) -> Result<TaskMapping>
pub async fn create_pending_mapping( &self, sync_source: &str, issue: &LinearIssue, ) -> Result<TaskMapping>
Create a pending mapping from a Linear issue
Sourcepub async fn mark_synced(
&self,
sync_source: &str,
linear_issue_id: &str,
motion_task_id: String,
) -> Result<()>
pub async fn mark_synced( &self, sync_source: &str, linear_issue_id: &str, motion_task_id: String, ) -> Result<()>
Update mapping with Motion task ID when sync succeeds
Sourcepub async fn mark_failed(
&self,
sync_source: &str,
linear_issue_id: &str,
error: String,
) -> Result<()>
pub async fn mark_failed( &self, sync_source: &str, linear_issue_id: &str, error: String, ) -> Result<()>
Update mapping when sync fails
Sourcepub async fn update_issue_data(
&self,
sync_source: &str,
linear_issue_id: &str,
issue: &LinearIssue,
) -> Result<()>
pub async fn update_issue_data( &self, sync_source: &str, linear_issue_id: &str, issue: &LinearIssue, ) -> Result<()>
Update the stored Linear issue data in a mapping (used for re-sync)
Sourcepub async fn list_mappings_by_status(
&self,
status: MappingStatus,
) -> Result<Vec<TaskMapping>>
pub async fn list_mappings_by_status( &self, status: MappingStatus, ) -> Result<Vec<TaskMapping>>
Get mappings by status
pub async fn flush(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for MappingStore
impl !RefUnwindSafe for MappingStore
impl Send for MappingStore
impl Sync for MappingStore
impl Unpin for MappingStore
impl !UnwindSafe for MappingStore
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