You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/Multicodec/Codecs.swift
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@
18
18
import Foundation
19
19
import VarInt
20
20
21
+
// swift-format-ignore
21
22
/// An Enum for navigating supported Multiformat Codecs and their properties, most importantly their Name and Integer Code
22
23
///
23
24
/// - Warning: Do not use the Codecs `rawValue` directly, instead make sure to use the `code` property to ensure backward compatibility with deprecated codecs.
@@ -568,7 +569,7 @@ public enum Codecs:UInt64, CaseIterable, Equatable {
568
569
case es512 =0xd01202
569
570
case rs256 =0xd01205
570
571
case scion =0xd02000
571
-
572
+
572
573
573
574
/// Allows instantiation of a Codec based on it's name
574
575
/// ```
@@ -591,17 +592,17 @@ public enum Codecs:UInt64, CaseIterable, Equatable {
591
592
self= s
592
593
}else{throwMulticodecError.UnknownCodecId }
593
594
}
594
-
595
+
595
596
publicinit(_ code:Int)throws{
596
597
guardlet s =Codecs(rawValue:UInt64(code))else{throwMulticodecError.UnknownCodecId }
597
598
self= s
598
599
}
599
-
600
+
600
601
publicinit(_ code:Int64)throws{
601
602
guardlet s =Codecs(rawValue:UInt64(code))else{throwMulticodecError.UnknownCodecId }
602
603
self= s
603
604
}
604
-
605
+
605
606
publicinit(_ code:UInt64)throws{
606
607
guardlet s =Codecs(rawValue: code)else{throwMulticodecError.UnknownCodecId }
607
608
self= s
@@ -615,18 +616,18 @@ public enum Codecs:UInt64, CaseIterable, Equatable {
0 commit comments