PLUS-POSTECH / soma

Cross-platform CTF problem container manager
Apache License 2.0
24 stars 3 forks source link

Make Backend a trait #112

Closed Qwaz closed 5 years ago

Qwaz commented 5 years ago

Warning! This PR changes index structure. You should delete your .soma directory once this PR is merged.

Resolves #100.

While working on this PR, I found that Rust's trait object is much more restrictive than Enum. I think we should discuss whether #100 is a right way to go or not. Using trait object is better if we are going to support more Backends in the future, but in the current status (git and local backend) I felt like it is a little bit premature abstraction.

Qwaz commented 5 years ago

Additional Note: I think 1) separating backend in a module and 2) move location_to_backend to that module is good regardless of using trait object or Enum