ExBoxPacker.Item protocol (ExBoxPacker v0.2.0)

Copy Markdown View Source

An item to be packed. Elixir analog of BoxPacker's Item interface.

All dimensions are integers in a caller-chosen unit (e.g. mm); weight is an integer in a caller-chosen unit (e.g. g). Be consistent across all items and boxes.

Summary

Types

t()

All the types that implement this protocol.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

allowed_rotation(item)

@spec allowed_rotation(t()) :: ExBoxPacker.Rotation.t()

depth(item)

@spec depth(t()) :: integer()

description(item)

@spec description(t()) :: String.t()

length(item)

@spec length(t()) :: integer()

weight(item)

@spec weight(t()) :: integer()

width(item)

@spec width(t()) :: integer()