(target: &PortalTarget)
| 269 | } |
| 270 | |
| 271 | pub fn close(target: &PortalTarget) -> Vec<u8> { |
| 272 | let mut text = String::with_capacity(target.name.as_ref().map_or(1, |s| 1 + s.len())); |
| 273 | text.push(target.target_type); |
| 274 | if let Some(name) = &target.name { |
| 275 | text.push_str(name); |
| 276 | } |
| 277 | let mut writer = BufferWriter::default(); |
| 278 | writer.add_cstring(&text); |
| 279 | writer.flush(Some(CODE_CLOSE)) |
| 280 | } |
| 281 | |
| 282 | pub fn flush() -> Vec<u8> { |
| 283 | code_only_buffer(CODE_FLUSH) |
nothing calls this directly
no test coverage detected