Struct lightspeed_cms::service::content::ContentService
source · pub struct ContentService<RepoManager: CmsRepositoryManager> { /* private fields */ }
Implementations§
source§impl<RepoManager: CmsRepositoryManager> ContentService<RepoManager>
impl<RepoManager: CmsRepositoryManager> ContentService<RepoManager>
pub fn new(c3p0: RepoManager::C3P0, repo_factory: RepoManager) -> Self
pub async fn create_content_table( &self, schema: &SchemaModel ) -> Result<(), LightSpeedError>
pub async fn drop_content_table( &self, schema_id: i64 ) -> Result<(), LightSpeedError>
pub async fn count_all_by_schema_id( &self, schema_id: i64 ) -> Result<u64, LightSpeedError>
pub async fn create_content( &self, schema: &Schema, create_content_dto: CreateContentDto ) -> Result<ContentModel, LightSpeedError>
pub async fn delete_content( &self, content_model: ContentModel ) -> Result<ContentModel, LightSpeedError>
Trait Implementations§
source§impl<RepoManager: Clone + CmsRepositoryManager> Clone for ContentService<RepoManager>
impl<RepoManager: Clone + CmsRepositoryManager> Clone for ContentService<RepoManager>
source§fn clone(&self) -> ContentService<RepoManager>
fn clone(&self) -> ContentService<RepoManager>
Returns a copy 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<RepoManager> !RefUnwindSafe for ContentService<RepoManager>
impl<RepoManager> Send for ContentService<RepoManager>
impl<RepoManager> Sync for ContentService<RepoManager>
impl<RepoManager> Unpin for ContentService<RepoManager>
impl<RepoManager> !UnwindSafe for ContentService<RepoManager>
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