Question: what does it mean when a guy rubs your palm with his middle finger?
Answer: He's being dominant If a guy is trying to dominate the people around him he will typically touch them more than usual. By doing this it shows that they are not a threat to him and it implies that he is of a higher position than they are. This could be the reason that he rubbed your hand with his finger.