Structure theorems for certain topological rings