Bytes

public struct Bytes : Regular

Memory layout of a type, without any detail about parts.

  • The minimum alignment of an instance. Always a power of 2.

    Declaration

    Swift

    let alignment: Int
  • The number of bytes occupied by an instance.

    Declaration

    Swift

    let size: Int
  • The number of bytes between the beginnings of consecutive array elements.

    Declaration

    Swift

    var stride: Int { get }
  • Returns the layout of the tuple (S, T), where S and T are types whose layout is represented by self and t respectively.

    Note

    the T instance is stored t.size bytes before the end of the tuple.

    Declaration

    Swift

    public func appending(_ t: `Self`) -> TypeLayout.Bytes