pub struct CodebaseStore { /* private fields */ }Implementations§
Source§impl CodebaseStore
impl CodebaseStore
pub fn new(db: Database) -> CodebaseStore
pub async fn save(&self, codebase: &Codebase) -> Result<(), ServerError>
pub async fn get(&self, id: &str) -> Result<Option<Codebase>, ServerError>
pub async fn list_by_workspace( &self, workspace_id: &str, ) -> Result<Vec<Codebase>, ServerError>
pub async fn update( &self, id: &str, branch: Option<&str>, label: Option<&str>, repo_path: Option<&str>, source_type: Option<&str>, source_url: Option<&str>, ) -> Result<(), ServerError>
pub async fn delete(&self, id: &str) -> Result<(), ServerError>
pub async fn get_default( &self, workspace_id: &str, ) -> Result<Option<Codebase>, ServerError>
pub async fn set_default( &self, workspace_id: &str, codebase_id: &str, ) -> Result<(), ServerError>
pub async fn find_by_repo_path( &self, workspace_id: &str, repo_path: &str, ) -> Result<Option<Codebase>, ServerError>
Auto Trait Implementations§
impl Freeze for CodebaseStore
impl RefUnwindSafe for CodebaseStore
impl Send for CodebaseStore
impl Sync for CodebaseStore
impl Unpin for CodebaseStore
impl UnsafeUnpin for CodebaseStore
impl UnwindSafe for CodebaseStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more