Read the following sentence:
"His words were a double-edged sword, cutting deep into her heart even as they offered a sliver of hope."
Which type of figurative language is primarily illustrated in this sentence?