1 unstable release

0.1.0 Jun 28, 2023

#1427 in Procedural macros

Custom license

5KB

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;
}

Dependencies

~205–640KB
~15K SLoC