I'm writing to a generic "file", but in case of an error, i want to rewind the file to the start in the case of an error (in order to retry), but if it doesn't support rewinding, i just want to return the error without retrying.
to make this more difficult, ErrorKind::NotSeekable is unstable.
i know about specialization. it is possible on nightly.
i'm looking for an alternative, perhaps something like the typestate pattern.
that's not a viable option, this function is the main entrypoint to my codebase. i would have to duplicate the entire codebase, or i would have to make the two functions wrappers around the actual solution.