this is really mehhh because if it was possible to embed
following/followers collections this would be pointless but it isn't so
to avoid making multiple fetches i'm adding these fields in the first
actor document
very much ad-hoc but at least i made the ns page so it should be kind of
ok to use i think? if others want to use upub frontend and have all its
features working, this extension will be necessary, rather than some
custom whole api
basically now object.as_actor() or object.as_collection() returns an
option which is full with a self ref only if the type is correct, so
that we can assume flexible json behavior from anything implementing our
apb traits, and we don't need to rely anymore on knowing the underlying
type
also little import refactor
no more "impl ..." hell, each trait has associated types so that we know
it's a "Self::Link" or a "Self::Actor", but in practice they can both be
a "serde_json::Value" and thus we can change its type. also Node::Array
is now a Vec<T> rather than Vec<Node<T>> because it makes more sense.
Node is Iterable and will yield zero (Empty|Link), one (Object) or many
(Array) Ts