[pbs-devel] [PATCH proxmox-backup 1/6] src/server/worker_task.rs: Avoid using pbs-api-type::Authid

Dietmar Maurer dietmar at proxmox.com
Fri Sep 24 11:03:34 CEST 2021


> On 09/23/2021 3:20 PM Fabian Grünbichler <f.gruenbichler at proxmox.com> wrote:
> 
>  
> On September 23, 2021 12:13 pm, Dietmar Maurer wrote:
> > Because we want to move worker_task.rs into proxmox-rest-server crate.
> 
> as discussed off-list, we could use a 
> 
> struct AuthidStr(String)
> 
> or a trait defined in proxmox instead of a regular String, to avoid 
> accidentally passing in other, non authid strings. all Authid 
> implementations would then need to implement Into<AuthidStr> (/the 
> trait), and the calls below to to_string() would become into() (remain 
> as they were).
> 
> can also be done as follow-up with a proxmox bump if we want to discuss 
> it more in-depth but still go ahead with the split/move now.

I am still not sure whats the best way to implement this, so I committed
what we have so far...





More information about the pbs-devel mailing list