AccessControlLevel

public enum AccessControlLevel : String, CustomStringConvertible
extension AccessControlLevel: Comparable

The accessibility of a Swift source declaration.

  • Accessible by the declaration’s immediate lexical scope.

    Declaration

    Swift

    case `private` = "source.lang.swift.accessibility.private"
  • Accessible by the declaration’s same file.

    Declaration

    Swift

    case `fileprivate` = "source.lang.swift.accessibility.fileprivate"
  • Accessible by the declaration’s same module, or modules importing it with the @testable attribute.

    Declaration

    Swift

    case `internal` = "source.lang.swift.accessibility.internal"
  • Accessible by the declaration’s same program.

    Declaration

    Swift

    case `public` = "source.lang.swift.accessibility.public"
  • Accessible and customizable (via subclassing or overrides) by the declaration’s same program.

    Declaration

    Swift

    case open = "source.lang.swift.accessibility.open"
  • Initializes an access control level by its Swift source keyword value.

    Declaration

    Swift

    public init?(description value: String)

    Parameters

    value

    The value used to describe this level in Swift source code.

  • Declaration

    Swift

    public var description: String { get }
  • Returns true if is private or fileprivate

    Declaration

    Swift

    public var isPrivate: Bool { get }
  • Declaration

    Swift

    public static func < (lhs: AccessControlLevel, rhs: AccessControlLevel) -> Bool