Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a failover strategy? #24

Open
lu-zero opened this issue Dec 21, 2024 · 2 comments
Open

Provide a failover strategy? #24

lu-zero opened this issue Dec 21, 2024 · 2 comments

Comments

@lu-zero
Copy link

lu-zero commented Dec 21, 2024

Some project might want to check if the Apple-way is populated for compatibility and use xdg otherwise, is it possible to have a strategy that does that automatically or make an enum for the AppStrategy in any case?

@utkarshgupta137
Copy link
Collaborator

It should be easy to create an instance of AppleStrategy & check the locations and then use other strategies if required. I don't think it makes a lot of sense to create a wrapper in this crate, since there could be a lot of desired combinations. Instead of an enum, you could use a boxed trait in your code to abstract it away.

@lu-zero
Copy link
Author

lu-zero commented Dec 21, 2024

AppStrategy is not dyn-compatible as it is, I can send you the patch to move the new away so the boxed trait approach is feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants