(&mut self, identifier: &TFieldIdentifier)
| 411 | } |
| 412 | |
| 413 | fn write_field_begin(&mut self, identifier: &TFieldIdentifier) -> crate::Result<()> { |
| 414 | if identifier.id.is_none() && identifier.field_type != TType::Stop { |
| 415 | return Err(crate::Error::Protocol(ProtocolError { |
| 416 | kind: ProtocolErrorKind::Unknown, |
| 417 | message: format!( |
| 418 | "cannot write identifier {:?} without sequence number", |
| 419 | &identifier |
| 420 | ), |
| 421 | })); |
| 422 | } |
| 423 | |
| 424 | self.write_byte(field_type_to_u8(identifier.field_type))?; |
| 425 | if let Some(id) = identifier.id { |
| 426 | self.write_i16(id) |
| 427 | } else { |
| 428 | Ok(()) |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | fn write_field_end(&mut self) -> crate::Result<()> { |
| 433 | Ok(()) |
nothing calls this directly
no test coverage detected