In the United States, regulation of broker dealer credit is dictated by Regulation T, that for a non-margin account, 100% of a trade must be funded.
FINRA has supplemented that regulation with an anti-"free rider" rule, Rule 4210(f)(9), which reads
No member shall permit a customer (other than a broker-dealer or a “designated
account”) to make a practice, directly or indirectly, of effecting transactions in a cash
account where the cost of securities purchased is met by the sale of the same securities.
No member shall permit a customer to make a practice of selling securities with them in a
cash account which are to be received against payment from another broker-dealer where
such securities were purchased and are not yet paid for. A member transferring an
account which is subject to a Regulation T 90-day freeze to another member firm shall
inform the receiving member of such 90-day freeze.
It is only funds from uncleared sold equities that are prohibited from being used to purchase securities.
This means that an equity in one's account that is settled can be sold and can be purchased only with settled funds. Once the amount required to purchase is in excess of the amount of settled funds, no more purchases can be made, so an equity sold by an account with settled funds can be repurchased immediately with the settled funds so long as the settled funds can fund the purchase.
Margin
A closed position is not considered a "long" or "short" since it is an account with one loan of security and one asset of security and one cash loan and one cash liability with the excess or deficit equity equal to any profit or loss, respectively, thus unexposed to the market, only to the creditworthiness of the clearing & settling chain.
Only open positions are considered "longs" or "shorts", a "long" being a possession of a security, and a "short" being a liability, because they are exposed to the market.
Since unsettled funds are not considered "longs" or "shorts", they are not encumbered by previous trades, thus only the Reg T rules apply to new and current positions.
Cash vs Margin
A cash account cannot purchase with unsettled funds. A margin account can. This means that a margin account could theoretically do an infinite amount of trades using unsettled funds. A cash account's daily purchases are restricted to the amount of settled funds, so once those are exhausted, no more purchases can be made.
The opposite is true for cash accounts as well. Unsettled securities cannot be sold either.
In summation, unsettled assets can not be traded in a cash account.