orbital

Crates.ioorbital
lib.rsorbital
version0.1.0
sourcesrc
created_at2023-06-28 01:31:46.886547
updated_at2023-06-28 01:31:46.886547
descriptionAutomation of boiler-templates generated by CakePattern
homepage
repositoryhttps://github.com/HalsekiRaika/orbital.git
max_upload_size
id901780
size5,850
RechellaTek (HalsekiRaika)

documentation

README

Automation generate boiler-template in Cake Pattern

Usage

#[orbital::export_service] // <- Add
#[async_trait::async_trait]
pub trait UserRepository: 'static + Sync + Send {
    async fn create(create: CreateUserDto) -> Result<(), ErrorKind>;
    async fn update(update: UpdateUserDto) -> Result<(), ErrorKind>;
    async fn delete(delete: &UserId) -> Result<(), ErrorKind>;

    async fn find_by_id(id: &UserId) -> Result<Option<User>, ErrorKind>;
}

// Auto-Generated by `orbital::export_service`
pub trait DependOnUserRepository: 'static + Sync + Send {
    type UserRepository: UserRepository;
    fn user_repository(&self) -> &Self::UserRepository;
}
Commit count: 6

cargo fmt