code: func Migrate(dst, src Transient) error {
  	if dstM, ok := dst.(Migrator); ok {
  		if srcM, ok := src.(Migrator); ok {
  			// Full-fidelity migration, them.
  			s := srcM.StateForMigration()
  			return dstM.WriteStateForMigration(s, true)
  		}
  	}
  
  	// Managers to not support full-fidelity migration, so migration will not
  	// preserve serial/lineage.
  	s := src.State()
  	return dst.WriteState(s)
  }
docs: // Migrate writes the latest transient state snapshot from src into dest,
  // preserving snapshot metadata (serial and lineage) where possible.
  //
  // If both managers implement the optional interface Migrator then it will
  // be used to copy the snapshot and its associated metadata. Otherwise,
  // the normal Reader and Writer interfaces will be used instead.
  //
  // If the destination manager refuses the new state or fails to write it then
  // its error is returned directly.
  //
  // For state managers that also implement Persistent, it is the caller's
  // responsibility to persist the newly-written state after a successful result,
  // just as with calls to Writer.WriteState.
  //
  // This function doesn't do any locking of its own, so if the state managers
  // also implement Locker the caller should hold a lock on both managers
  // for the duration of this call.