It is a rhetorical device in which two or more clauses are balanced against each other by the reversal of their structures in order to produce an artistic effect.
chiasmus
15
What's this?
chiasmus
15
A proposition that contrasts with or reverses some previously mentioned proposition, or when two opposites are introduced together for contrasting effect.