Lines Matching refs:writer
79 fn handle_capture_get(writer: ResponseWritable, id: ChipIdentifier) -> anyhow::Result<()> { in handle_capture_get()
107 writer.put_ok_with_length( in handle_capture_get()
117 writer.put_chunk(&buffer[..length]); in handle_capture_get()
123 fn handle_capture_list(writer: ResponseWritable) -> anyhow::Result<()> { in handle_capture_list()
137 writer.put_ok("text/json", &json_response, vec![]); in handle_capture_list()
144 writer: ResponseWritable, in handle_capture_patch()
163 writer.put_ok("text/json", &json_response, vec![]); in handle_capture_patch()
169 pub fn handle_capture(request: &Request<Vec<u8>>, param: &str, writer: ResponseWritable) { in handle_capture()
170 if let Err(e) = handle_capture_internal(request, param, writer) { in handle_capture()
171 writer.put_error(404, &e.to_string()); in handle_capture()
185 writer: ResponseWritable, in handle_capture_internal()
189 "GET" => handle_capture_list(writer), in handle_capture_internal()
194 "GET" => handle_capture_get(writer, get_id(param)?), in handle_capture_internal()
200 "0" => handle_capture_patch(writer, id, false), in handle_capture_internal()
201 "1" => handle_capture_patch(writer, id, true), in handle_capture_internal()
234 &mut CxxServerResponseWriterWrapper { writer: responder }, in handle_capture_cxx()