Module foundation

Source
Expand description

Access essential data types, collections, and operating-system services to define the base layer of functionality for your app.

Re-exports§

pub use ns_array::NSArray;

Modules§

macros
Macros for working with the Foundation framework.
ns_array
A type that represents a pointer to an Objective-C object.
ns_localekey
The keys used to access components of a locale.
string
Enums for String Encoding

Structs§

NSAttributedString
A string with associated attributes (such as visual style, hyperlinks, or accessibility data) for portions of its text.
NSAutoreleasePool
An object that supports Cocoa’s reference-counted memory management system.
NSBundle
A representation of the code and resources stored in a bundle directory on disk.
NSCharacterSet
A character set containing the characters in Unicode General Categories L*, M*, and N*.
NSCoder
An abstract class that serves as the basis for objects that enable archiving and distribution of other objects.
NSData
A static byte buffer in memory.
NSDate
A representation of a specific point in time, independent of any calendar or time zone.
NSDateComponents
An object that specifies a date or time in terms of units (such as year, month, day, hour, and minute) to be evaluated in a calendar system and time zone.
NSDecimalNumber
An object for representing and performing arithmetic on base-10 numbers.
NSDecimalNumberHandler
A class that adopts the decimal number behaviors protocol.
NSDictionary
A static collection of objects associated with unique keys.
NSEdgeInsets
A description of the distance between the edges of two rectangles.
NSEnumerator
An abstract class whose subclasses enumerate collections of objects, such as arrays and dictionaries.
NSError
Information about an error condition including a domain, a domain-specific error code, and application-specific information.
NSFileWrapper
NSFormatter
An abstract class that declares an interface for objects that create, interpret, and validate the textual representation of values.
NSIndexSet
An immutable collection of unique integer values that represent indexes in another collection.
NSLocale
The NSLocale class provides information about the user’s locale and formatting preferences.
NSMutableArray
A dynamic ordered collection of objects.
NSMutableDictionary
A dynamic collection of objects associated with unique keys.
NSMutableString
A mutable string.
NSNotification
A container for information broadcast through a notification center to all registered observers.
NSNull
Returns the singleton instance of NSNull.
NSNumber
An object wrapper for primitive scalar numeric values.
NSNumberFormatter
A formatter that converts between numeric values and their textual representations.
NSOperatingSystemVersion
A structure that contains version information about the currently executing operating system, including major, minor, and patch version numbers.
NSOrthography
A description of the linguistic content of natural language text, typically used for spelling and grammar checking.
NSPredicate
A definition of logical conditions for constraining a search for a fetch or for in-memory filtering.
NSProcessInfo
A collection of information about the current process.
NSRange
A structure used to describe a portion of a series, such as characters in a string or objects in an array.
NSSet
A static, unordered collection of unique objects.
NSSpellServer
A server that your app uses to provide a spell checker service to other apps running in the system.
NSString
This is a mapping to the Objective-C NSString class.
NSTextCheckingResult
NSURL
An object that represents the location of a resource, such as an item on a remote server or the path to a local file.
NSUUID
A universally unique value that can be used to identify types, interfaces, and other items.

Enums§

LanguageDirection
The directions that a language may take across a page of text.
MachOArchitecture
NSActivityOptions
Option flags used with begin_activity_with_options_reason and perform_activity_with_options_reason_using_block.
NSAlignmentOptions
NSAttributedStringEnumerationOptions
NSByteCountFormatterCountStyle
NSByteCountFormatterUnits
NSCalculationError
Calculation error constants used to describe an error in exceptionDuringOperation:error:leftOperand:rightOperand:.
NSCalendarOptions
NSCalendarUnit
NSComparisonPredicateModifier
NSComparisonPredicateOptions
NSComparisonResult
Constants that indicate sort order.
NSCompoundPredicateType
NSDataBase64DecodingOptions
Options to modify the decoding algorithm used to decode Base64 encoded data.
NSDataBase64EncodingOptions
Options for methods used to Base64 encode data.
NSDataCompressionAlgorithm
An algorithm that indicates how to compress or decompress data.
NSDataReadingOptions
Options for methods used to read data objects.
NSDataSearchOptions
Options for method used to search data objects.
NSDataWritingOptions
Options for methods used to write data objects.
NSDateComponentsFormatterUnitsStyle
NSDateFormatterBehavior
Constants that specify the behavior NSDateFormatter should exhibit.
NSDateFormatterStyle
NSDateIntervalFormatterStyle
NSDecodingFailurePolicy
NSDirectoryEnumerationOptions
NSEnergyFormatterUnit
NSEnumerationOptions
NSExpressionType
NSFileCoordinatorReadingOptions
NSFileCoordinatorWritingOptions
NSFileManagerItemReplacementOptions
NSFileVersionAddingOptions
NSFileVersionReplacingOptions
NSFileWrapperReadingOptions
NSFileWrapperWritingOptions
NSFormattingContext
The formatting context for a formatter.
NSFormattingUnitStyle
Specifies the width of the unit, determining the textual representation.
NSHttpCookieAcceptPolicy
NSIso8601DateFormatOptions
NSItemProviderErrorCode
NSItemProviderFileOptions
NSItemProviderRepresentationVisibility
NSJsonReadingOptions
NSJsonWritingOptions
NSKeyValueChange
NSKeyValueObservingOptions
NSKeyValueSetMutationKind
NSLengthFormatterUnit
NSLigatureType
NSLinguisticTaggerOptions
NSLinguisticTaggerUnit
NSLocaleLanguageDirection
NSMassFormatterUnit
NSMatchingFlags
NSMatchingOptions
NSMeasurementFormatterUnitOptions
NSNetServiceOptions
These constants specify options for a network service.
NSNotificationCoalescing
NSNumberFormatterBehavior
NSNumberFormatterPadPosition
These constants are used to specify how numbers should be padded. These constants are used by the paddingPosition property.
NSNumberFormatterRoundingMode
These constants are used to specify how numbers should be rounded. These constants are used by the roundingMode property.
NSNumberFormatterStyle
NSOperationQueuePriority
NSPersonNameComponentsFormatterOptions
NSPersonNameComponentsFormatterStyle
NSPostingStyle
NSPredicateOperatorType
NSProcessInfoThermalState
Values used to indicate the system’s thermal state.
NSPropertyListFormat
These constants are used to specify a property list serialization format.
NSPropertyListMutabilityOptions
These constants specify mutability options in property lists.
NSQualityOfService
NSRectEdge
NSRegularExpressionOptions
NSRoundingMode
These constants specify rounding behaviors.
NSSearchPathDirectory
NSSearchPathDomain
NSSortOptions
NSStreamEvent
NSStreamStatus
The type declared for the constants listed in Stream Status Constants.
NSStringCompareOptions
These values represent the options available to many of the string classes’ search and comparison methods.
NSStringDrawingOptions
NSStringEncodingConversionOptions
NSTextCheckingType
NSTextCheckingTypes
NSTimeZoneNameStyle
NSUbiquitousKeyValueStoreChangeReason
NSUrlBookmarkCreationOptions
NSUrlBookmarkResolutionOptions
NSUrlError
NSUrlErrorCancelledReason
NSUrlRelationship
NSUrlRequestCachePolicy
The constants used to specify interaction with the cached responses.
NSUrlRequestNetworkServiceType
NSUrlSessionAuthChallengeDisposition
NSUrlSessionDelayedRequestDisposition
NSUrlSessionResponseDisposition
NSUrlSessionTaskMetricsResourceFetchType
NSUrlSessionTaskState
NSVolumeEnumerationOptions
NSWritingDirection
NSXpcConnectionOptions

Constants§

UTF8_ENCODING
Size of UTF8 encoding

Statics§

FullwidthToHalfwidth
A constant containing the transformation of a string from full-width CJK characters to half-width forms.
HiraganaToKatakana
A constant containing the transliteration of a string from Hiragana script to Katakana script.
LatinToArabic
LatinToArabic
LatinToCyrillic
A constant containing the transliteration of a string from Latin script to Cyrillic script.
LatinToGreek
A constant containing the transliteration of a string from Latin script to Greek script.
LatinToHangul
A constant containing the transliteration of a string from Latin script to Hangul script.
LatinToHebrew
A constant containing the transliteration of a string from Latin script to Hebrew script.
LatinToHiragana
A constant containing the transliteration of a string from Latin script to Hiragana script.
LatinToKatakana
A constant containing the transliteration of a string from Latin script to Katakana script.
LatinToThai
A constant containing the transliteration of a string from Latin script to Thai script.
MandarinToLatin
A constant containing the transliteration of a string from Han script to Latin.
NSCurrentLocaleDidChangeNotification
A notification that indicates that the user’s locale changed.
NSEdgeInsetsZero
A zero initialized NSEdgeInsets.
NSGrammarCorrections
The value for the NSGrammarCorrections key should be an NSArray of NSStrings representing potential substitutions to correct the problem, but it is expected that this may not be available in all cases. NSGrammarUserDescription or NSGrammarCorrections must be supplied in order for correction guidance to be presented to the user.
NSGrammarRange
The value for the NSGrammarRange dictionary key should be an NSValue containing an NSRange, a subrange of the sentence range used as the return value, whose location should be an offset from the beginning of the sentence–so, for example, an NSGrammarRange for the first four characters of the overall sentence range should be {0, 4}. If the NSGrammarRange key is not present in the dictionary it is assumed to be equal to the overall sentence range.
NSGrammarUserDescription
The value for the NSGrammarUserDescription dictionary key should be an NSString containing descriptive text about that range, to be presented directly to the user; it is intended that the user description should provide enough information to allow the user to correct the problem. It is recommended that NSGrammarUserDescription be supplied in all cases, however, NSGrammarUserDescription or NSGrammarCorrections must be supplied in order for correction guidance to be presented to the user.
NSProcessInfoPowerStateDidChangeNotification
Posts when the power state of a device changes.
NSProcessInfoThermalStateDidChangeNotification
Posts when the thermal state of the system changes.
NSSPELLSERVER_PTR
StripCombiningMarks
A constant containing the transformation of a string by removing combining marks.
StripDiacritics
A constant containing the transformation of a string by removing diacritics.
ToLatin
A constant containing the transliteration of a string from any script to Latin script.
ToUnicodeName
An identifier for a transform that converts characters to Unicode names.
ToXMLHex
A constant containing the transformation of a string from characters to XML hexadecimal escape codes.

Traits§

INSAttributedString
A trait containing all the methods for NSAttributedString
INSAutoreleasePool
A trait containing all the methods for NSAutoreleasePool
INSBundle
A trait containing all the methods for NSBundle
INSCharacterSet
A trait containing all the methods for NSCharacterSet
INSCoder
A trait containing all the methods for NSCoder
INSData
A trait containing all the methods for NSData
INSDate
A trait containing all the methods for NSDate
INSDecimalNumber
A trait containing all the methods for NSDecimalNumber
INSDecimalNumberHandler
A trait containing all the methods for NSDecimalNumberHandler
INSDictionary
A static collection of objects associated with unique keys.
INSEnumerator
An abstract class whose subclasses enumerate collections of objects, such as arrays and dictionaries.
INSError
A trait containing all the methods for NSError
INSFileWrapper
A trait containing all the methods for NSFileWrapper
INSFormatter
A trait containing all the methods for NSFormatter
INSIndexSet
A trait containing all the methods for NSIndexSet
INSLocale
A trait containing all the methods for NSLocale
INSMutableDictionary
A dynamic collection of objects associated with unique keys.
INSMutableString
A trait containing all the methods for NSMutableString
INSNotification
A trait containing all the methods for NSNotification
INSNull
A trait containing all the methods for NSNull
INSNumber
A trait containing all the methods for NSNumber
INSNumberFormatter
A trait containing all the methods for NSNumberFormatter
INSOrthography
A trait containing all the methods for NSOrthography
INSProcessInfo
A trait containing all the methods for NSProcessInfo
INSSpellServer
A trait containing all the methods for NSSpellServer
INSString
A trait containing all the methods for NSString
INSURL
A trait containing all the methods for NSURL
INSUUID
A trait containing all the methods for NSUUID
PNSSpellServerDelegate
The optional methods implemented by the delegate of a spell server.

Functions§

NSDecimalAdd
Adds two decimal values.
NSDecimalCompact
Compacts the decimal structure for efficiency.
NSDecimalCompare
Compares two decimal values.
NSDecimalCopy
Creating a Decimal from Another Decimal
NSDecimalDivide
Multiplies two decimal numbers together.
NSDecimalMultiply
Subtracts one decimal value from another.
NSDecimalMultiplyByPowerOf10
Raises the decimal value to the specified power.
NSDecimalNormalize
Normalizes the internal format of two decimal numbers to simplify later operations.
NSDecimalPower
Multiplies a decimal by the specified power of 10.
NSDecimalRound
Rounds off the decimal value.
NSDecimalString
Returns a string representation of the decimal value appropriate for the specified locale.
NSDecimalSubtract
Subtracts one decimal value from another.
NSEdgeInsetsEqual
Checks if the receiver is equal to the given edge insets.
NSEdgeInsetsMake
Returns a new edge insets with the given top, left, bottom, and right values.
NSEqualRanges
Returns a Boolean value that indicates whether two given ranges are equal.
NSIntersectionRange
Returns the intersection of the specified ranges.
NSLocationInRange
Returns a Boolean value that indicates whether a specified position is in a given range.
NSLog
Respond to problem situations in your interactions with APIs, and fine-tune your app for better debugging.
NSMakeRange
Creates a new NSRange from the specified values.
NSMaxRange
Returns the sum of the location and length of the range.
NSRangeFromString
Returns a range from a textual representation.
NSStringFromRange
Returns a string representation of a range.
NSUnionRange
Returns the union of the specified ranges.
register_ns_spell_server_delegate_class

Type Aliases§

Double
A double-precision, floating-point value type.
Int
Describes an integer.
Int8
Describes an 8-bit signed integer.
Int16
Describes a 16-bit signed integer.
Int32
Describes a 32-bit signed integer.
Int64
Describes a 64-bit signed integer.
NSAttributedStringDocumentAttributeKey
Attributes that apply to a document.
NSAttributedStringDocumentReadingOptionKey
Options for importing documents.
NSAttributedStringKey
Attributes that you can apply to text in an attributed string.
NSComparator
Defines the signature for a block object used for comparison operations.
NSDecimal
Type alias for NSDecimalNumber.
NSErrorDomain
NSErrorUserInfoKey
These keys may exist in the user info dictionary.
NSLocaleKey
The keys used to access components of a locale.
NSNotificationName
A structure that defines the name of a notification.
NSPoint
A point in a Cartesian coordinate system.
NSPropertyListReadOptions
The only read options supported are described in NSPropertyListMutabilityOptions.
NSPropertyListWriteOptions
These constants specify mutability options in property lists.
NSRangePointer
Type indicating a parameter is a pointer to an NSRange structure.
NSRect
A rectangle.
NSSize
A two-dimensional size.
NSStringTransform
Constants representing an ICU string transform.
NSTimeInterval
A number of seconds.
UInt
Describes an unsigned integer.
UInt8
Describes an 8-bit unsigned integer.
UInt16
Describes a 16-bit unsigned integer.
UInt32
Describes a 32-bit unsigned integer.
UInt64
Describes a 64-bit unsigned integer.
unichar
Type for UTF-16 code units.