To safely cook eggs, follow these tips from the American Dietetic Association:
When you scramble eggs, cook them until you can't see any liquid.
When you poach or fry eggs, cook them until the white has completely set and the yolk begins to thicken.
When you hard-cook eggs, both the white and yolk should be set.
For stirred custards, cook until they are 160 degrees F and coat a spoon.
For baked custards, a knife slicing through near the center should come out clean.