An analytical model for non-equilibrium segregation during crystallization