Just for my own information, what tasks and costs are part of an M30 rebuild?

Does a rebuild essentially make the engine good as new?