How to get mesh depth on raycast hit?

I need to determine mesh depth along raycast direction when raycast hit something, is it possible?