rework arcana-base-server #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think the implementation that I originally write for
arcana-base-serveris bad for various of reasons (readability and hard adaptability for instance).whereTH: Clone,TH: TryFrom<Url, Error = String>,TH: Send,TH: Display,TH: 'static,AT: async_fn_traits::AsyncFnOnce3<TH,mpsc::Sender<Result<ApplyResponse, Status>>,ApplyRequest,Output = IoResult<()>,>,AT: Send,AT: Sync,AT: Copy,AT: 'static,BT: async_fn_traits::AsyncFnOnce3<TH,mpsc::Sender<Result<BuildResponse, Status>>,BuildRequest,Output = IoResult<()>,>,BT: Send,BT: Sync,BT: Copy,BT: 'static,CT: async_fn_traits::AsyncFnOnce3<TH,mpsc::Sender<Result<CopyClosureResponse, Status>>,CopyClosureRequest,Output = IoResult<()>,>,CT: Send,CT: Sync,CT: Copy,CT: 'static,{apply_function: AT,build_function: BT,copy_closure_function: CT,targets: Arc<Mutex<HashMap<Id, TH>>>,}should be rewrite as a trait instead, as for my last test, I was successfully able to put async functions inside traits (I think that last time I checked it wasn't possible).
pub fn new(apply_function: AT, build_function: BT, copy_closure_function: CT) -> Self {should be adapted to allow retro-compatibility with existing aracana servers.
Also we should find an alternative for mpsc::Sender as it makes server harder to implement.