Skip to content
New issue

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

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

Already on GitHub? # to your account

re-exposes CBORCoder and associated documentation #63

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Sources/AutomergeRepo/Documentation.docc/Curation/CBORCoder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ``AutomergeRepo/CBORCoder``

## Topics

### Accessing a CBOR encoder

- ``CBORCoder/encoder``

### Accessing a CBOR decoder

- ``CBORCoder/decoder``
1 change: 1 addition & 0 deletions Sources/AutomergeRepo/Documentation.docc/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The peer-to-peer provider uses of Apple's Bonjour technology to connect to other
- ``AutomergeRepo/PEER_ID``
- ``AutomergeRepo/STORAGE_ID``
- ``AutomergeRepo/SYNC_MESSAGE``
- ``CBORCoder``

### Share Policy

Expand Down
6 changes: 4 additions & 2 deletions Sources/AutomergeRepo/Sync/CBORCoder.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import Foundation
import PotentCBOR

/// A type that provides concurrency-safe access to the CBOR encoder and decoder.
actor CBORCoder {
/// A type that provides concurrency-safe access to a CBOR encoder and decoder.
public actor CBORCoder {
/// A CBOR encoder
public static let encoder = CBOREncoder()
/// A CBOR decoder
public static let decoder = CBORDecoder()
}
Loading