Bail is security for the appearance of a defendant to answer to a specific criminal charge before any court or magistrate at a specific time or at any time to which the case may be continued. It may take any of the following forms:
(a) The deposit by the defendant or by some other person for him of cash.
(b) The written undertaking by one or more persons to forfeit a sum of money equal to the amount of the bail if the defendant is in default for appearance, which shall be known as a recognizance.
(c) Such other form as the judge of the court that will have jurisdiction to try the offense may determine.
All bail shall be received by the clerk of the court, or by the magistrate and, except in case of recognizance, receipts shall be given therefor by him