Usually we define a metric on a space $X$ to be a map $X\times X\to\mathbb{R}$ that satisfies a few axioms. $\mathbb{R}$ has of course a total order. What if we instead have a metric $X\times X\to A$ where $A$ is a monoid with some kind of weaker order on it (I say monoid because the triangle inequality requires addition, and we'd also need a zero). It seems to me that if $A$ is a monoid and directed set, and if we define open sets as sets for which every point has a ball around it contained in the set, then this generalized metric induces a topology on $X$.
Is this a thing already? Which topological spaces can be endowed with this kind of metric? This feels natural because when going from metric spaces to topological spaces we have to talk about nets (maps from directed sets) rather than sequences (maps from the natural numbers). This is in a way analogous.
Edit: Changed group to monoid.
The paper
Ralph Kopperman. 1988. All topologies come from generalized metrics. Am. Math. Monthly 95, 2 (February 1988), 89-97, doi:10.2307/2323060.
does this (generalises the codomain of a metric to a quite large class of sets with addition and order) and shows that "all" (I recall a talk on it that showed it for Tychonoff spaces, so it might not be really all) topological spaces can be thus endowed.
There have been more of these efforts (some quite category-theoretical, others from computer science applications), but I don't have exact references there. This paper I've seen presented and your question reminded me of it.