Dictionary
struct Dictionary<Key, Value> : Collection, ExpressibleByDictionaryLiteral where Key : Hashable
-
Creates a dictionary from the Perl hash.
Throws
If some of the values cannot be converted to
Value
.Complexity
O(n), where n is the count of the hash.
Declaration
Swift
public init(_ hv: PerlHash) throws
Parameters
hv
The Perl hash with the values compatible with
Value
. -
Creates a dictionary from the reference to the Perl hash.
Throws
If
ref
is not a reference to a Perl hash or some of the values cannot be converted toValue
.Complexity
O(n), where n is the count of the hash.
Declaration
Swift
public init(_ ref: PerlScalar) throws
Parameters
ref
The reference to the Perl hash with the values compatible with
Value
.