auto enter context when packing and unpacking a Struct