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

Support static properties for default disk stores #17

Open
dimitribouniol opened this issue Jun 8, 2023 · 0 comments
Open

Support static properties for default disk stores #17

dimitribouniol opened this issue Jun 8, 2023 · 0 comments

Comments

@dimitribouniol
Copy link
Member

It would be much nicer to get a single common instance when getting the default store:

extension DiskPersistence where AccessMode == ReadWrite {
    /// The default persistence for the read-write store of an app.
    public static var `default`: DiskPersistence<AccessMode> = ...
}

extension DiskPersistence where AccessMode == ReadOnly {
    /// The default persistence for the read-only store of an app.
    public static var readOnlyDefault: DiskPersistence<AccessMode> = self.default.readOnly
}

However, the default URL helper cannot through in that case, specifically on Linux, and we must have a way from converting from a read-write store to a read-only one.

Depends on:

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

1 participant