pub fn encode(ld: &LambdaData) -> Result<Vec<u8>, LdError>
Encode a ΛD state vector to binary. Validates invariants at boundary.