-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
518 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import Foundation | ||
|
||
public enum AccessContentType { | ||
/// Retrieve value from or store value to [UserDefault](https://developer.apple.com/documentation/foundation/userdefaults). | ||
/// Default to [.standard](https://developer.apple.com/documentation/foundation/userdefaults/1416603-standard). | ||
case userDefaults(UserDefaults = .standard) | ||
/// Retrieve value from or store value to [NSCache](https://developer.apple.com/documentation/foundation/nscache). | ||
/// Have to provide an instance of **<NSString, AnyObject>**. | ||
case nsCache(NSCache<NSString, AnyObject>) | ||
/// Retrieve value from or store value to [NSMAPTable](https://developer.apple.com/documentation/foundation/nsmaptable) | ||
/// Have to provide an instance of **NSMapTable<NSString, AnyObject>**. | ||
case nsMapTable(NSMapTable<NSString, AnyObject>) | ||
} |
Binary file added
BIN
+8.94 KB
Sources/SwiftMacros/SwiftMacros.docc/Resources/documentation-art/macro-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# ``SwiftMacros`` | ||
|
||
A practical collection of Swift Macros that help code correctly and swiftly. | ||
|
||
@Metadata { | ||
@PageImage(purpose: icon, source: "macro-icon", alt: "Swift-Macros") | ||
@PageColor(green) | ||
} | ||
|
||
## Overview | ||
|
||
This collection of Swift Macros aims to remove boilerplate code by automatically generating needed code for a rich set of purposes. | ||
|
||
## Topics | ||
|
||
### Macros | ||
|
||
- ``Access(_:)`` | ||
- ``AddAssociatedValueVariable`` | ||
- ``AddInit(withMock:randomMockValue:)`` | ||
- ``AddPublisher`` | ||
- ``buildDate(_:)`` | ||
- ``buildURL(_:)`` | ||
- ``buildURLRequest(_:)`` | ||
- ``encode(_:outputFormatting:dateEncodingStrategy:dataEncodingStrategy:nonConformingFloatEncodingStrategy:keyEncodingStrategy:userInfo:)`` | ||
- ``decode(_:from:dateDecodingStrategy:dataDecodingStrategy:nonConformingFloatDecodingStrategy:keyDecodingStrategy:userInfo:allowsJSON5:assumesTopLevelDictionary:)`` | ||
- ``formatDate(_:dateStyle:timeStyle:formattingContext:formatterBehavior:doesRelativeDateFormatting:amSymbol:pmSymbol:weekdaySymbols:shortWeekdaySymbols:veryShortWeekdaySymbols:standaloneWeekdaySymbols:shortStandaloneWeekdaySymbols:veryShortStandaloneWeekdaySymbols:monthSymbols:shortMonthSymbols:veryShortMonthSymbols:standaloneMonthSymbols:shortStandaloneMonthSymbols:veryShortStandaloneMonthSymbols:quarterSymbols:shortQuarterSymbols:standaloneQuarterSymbols:shortStandaloneQuarterSymbols:eraSymbols:longEraSymbols:)`` | ||
- ``formatDateComponents(fromComponents:allowedUnits:allowsFractionalUnits:calendar:collapsesLargestUnit:includesApproximationPhrase:includesTimeRemainingPhrase:maximumUnitCount:unitsStyle:zeroFormattingBehavior:formattingContext:referenceDate:)`` | ||
- ``formatDateComponents(from:to:allowedUnits:allowsFractionalUnits:calendar:collapsesLargestUnit:includesApproximationPhrase:includesTimeRemainingPhrase:maximumUnitCount:unitsStyle:zeroFormattingBehavior:formattingContext:referenceDate:)`` | ||
- ``formatDateComponents(fromInterval:allowedUnits:allowsFractionalUnits:calendar:collapsesLargestUnit:includesApproximationPhrase:includesTimeRemainingPhrase:maximumUnitCount:unitsStyle:zeroFormattingBehavior:formattingContext:referenceDate:)`` | ||
- ``formatDateInterval(from:to:dateStyle:timeStyle:dateTemplate:calendar:locale:timeZone:)`` | ||
- ``Mock(type:randomMockValue:)`` | ||
- ``postNotification(_:object:userInfo:from:)`` | ||
- ``Singleton`` | ||
|
Oops, something went wrong.