Skip to main content

write_record

Function write_record 

Source
pub(crate) async fn write_record(
    state: &AppState,
    did: &str,
    client_id: Option<&ClientId>,
    collection: &str,
    rkey: Option<&str>,
    record: Value,
    swap: &Swap,
    occupied: Occupied,
    bytes: usize,
) -> Response
Expand description

The write both createRecord and putRecord perform.

One function because they are one operation apart from swap and occupied, and writing the response assembly twice is how the two would start disagreeing about the shape of a uri.