Get the data to be signed for this delegation.
(&self)
| 557 | |
| 558 | /// Get the data to be signed for this delegation. |
| 559 | pub fn signing_data(&self) -> Vec<u8> { |
| 560 | let mut data = Vec::new(); |
| 561 | data.extend_from_slice(self.delegator_id.as_bytes()); |
| 562 | data.extend_from_slice(self.delegate_id.as_bytes()); |
| 563 | data.extend_from_slice(&self.created_at.timestamp().to_le_bytes()); |
| 564 | if let Some(exp) = self.expires_at { |
| 565 | data.extend_from_slice(&exp.timestamp().to_le_bytes()); |
| 566 | } |
| 567 | data |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | impl fmt::Display for Delegation { |
nothing calls this directly
no test coverage detected