UserData

public enum UserData

UserData represents the user data associated with an Epoll or Kqueue event.

  • fd

    A file descriptor.

    Declaration

    Swift

    case fd(Int32)
  • u32

    An UInt32.

    Declaration

    Swift

    case u32(UInt32)
  • u64

    An UInt64.

    Declaration

    Swift

    case u64(UInt64)
  • ptr

    A raw pointer.

    Declaration

    Swift

    case ptr(UnsafeMutableRawPointer)
  • Creates a UserData enum by converting the provided data value from UInt64 to UInt32. The provided UserData must be a .u64.

    Declaration

    Swift

    public init?(asU32 d: UserData)
  • Creates a UserData enum by converting the provided data value from UInt64 to an In32. The provided UserData must be a .u64.

    Declaration

    Swift

    public init?(asFD d: UserData)
  • Creates a UserData enum by casting the provided data value from UInt64 to a raw pointer. The provided UserData must be a .u64.

    Declaration

    Swift

    public init?(asPtr d: UserData)
  • Equatable implementation for UserData.

    Declaration

    Swift

    public static func ==(lhs: UserData, rhs: UserData) -> Bool