(To Have a) Mind Like a Steel Trap

What does the idiom “(To Have a) Mind Like a Steel Trap” mean?

Definition:

An intelligent person who grasps concepts extremely quickly

For example:

“Andrew seems as though he’s not paying attention, but he’s got a mind like a steel trap. At the end he can tell you everything that was discussed.”