pub(super) async fn resolve<T: TransactedSyncV4Queries>(
transaction: &mut T,
key: ConnectionKey,
pos: Option<String>,
) -> Result<ResolvedConnection, SyncV4Error>Expand description
Resolves a connection from its (user ID, device ID, connection ID) triplet.
This will also insert/delete a connection when needed.
§Errors
SyncV4Error::SyncTokenParseError: Well, obviously, if we failed to parse the request’s token.SyncV4Error::InternalServerError: If anything went wrong on our side (most likely while communicating with the database).SyncV4Error::UnknownPos: If the request contains apostoken but we did not find any connection stored for the given triplet, or that position is not found in the connection.SyncV4Error::PosFromFuture: If the givenposcontains a token that is past the server’s current token (seesync_token::get_current_token).