Instance Methodpointfreeco.swift-sharing 2.2.0Sharing
hash(into:)
FileStorageKey.swift:404func hash(into hasher: inout Hasher)
func hash(into hasher: inout Hasher)
import Sharing
Instantly share state among your app’s features and external persistence layers, including user defaults, the file system, and more.
struct FileStorage
A type that encapsulates saving and loading data from disk.
@frozen struct Hasher
The universal hash function used by Set
and Dictionary
.
static let fileSystem: FileStorage
File storage that interacts directly with the file system for saving, loading and listening for file changes.
static var inMemory: Self { get }
File storage that emulates a file system without actually writing anything to disk.
static func inMemory(fileSystem: LockIsolated<[URL : Data]>, scheduler: AnySchedulerOf<DispatchQueue> = .immediate) -> FileStorage
let save: (Data, URL) throws -> Void
static func == (lhs: Self, rhs: Self) -> Bool