(&mut self, actor: &ActorRef)
| 658 | } |
| 659 | |
| 660 | fn put_actor(&mut self, actor: &ActorRef) -> Result<(), OperationCodecError> { |
| 661 | match actor { |
| 662 | ActorRef::Human { did } => { |
| 663 | self.put_u8(0)?; |
| 664 | self.put_string(did, "human actor DID") |
| 665 | } |
| 666 | ActorRef::Agent { did, session, turn } => { |
| 667 | self.put_u8(1)?; |
| 668 | self.put_string(did, "agent actor DID")?; |
| 669 | self.put_string(session, "agent session")?; |
| 670 | self.put_optional_tag(turn.is_some())?; |
| 671 | if let Some(turn) = turn { |
| 672 | self.put_u64(*turn)?; |
| 673 | } |
| 674 | Ok(()) |
| 675 | } |
| 676 | ActorRef::System { name } => { |
| 677 | self.put_u8(2)?; |
| 678 | self.put_string(name, "system actor name") |
| 679 | } |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | fn put_loss_note(&mut self, note: &OperationLossNote) -> Result<(), OperationCodecError> { |
| 684 | ensure_strictly_sorted(¬e.evidence, "loss-note evidence")?; |
no test coverage detected