| 56 | } |
| 57 | |
| 58 | pub trait ThreadToMain<AllocU8:Allocator<u8>> { |
| 59 | const COOPERATIVE: bool; |
| 60 | const ISOLATED: bool; |
| 61 | #[inline(always)] |
| 62 | fn pull_data(&mut self) -> ThreadData<AllocU8>; |
| 63 | #[inline(always)] |
| 64 | fn pull_context_map(&mut self, m8: Option<&mut RepurposingAlloc<u8, AllocU8>>) -> Result<PredictionModeContextMap<AllocatedMemoryPrefix<u8, AllocU8>>, ()>; |
| 65 | //fn alloc_literal(&mut self, len: usize, m8: Option<&mut RepurposingAlloc<u8, AllocU8>>) -> LiteralCommand<AllocatedMemoryPrefix<u8, AllocU8>>; |
| 66 | #[inline(always)] |
| 67 | fn push_cmd<Specialization:EncoderOrDecoderRecoderSpecialization>( |
| 68 | &mut self, |
| 69 | cmd:&mut Command<AllocatedMemoryPrefix<u8, AllocU8>>, |
| 70 | m8: Option<&mut RepurposingAlloc<u8, AllocU8>>, |
| 71 | recoder: Option<&mut DivansRecodeState<AllocU8::AllocatedMemory>>, |
| 72 | specialization: &mut Specialization, |
| 73 | output:&mut [u8], |
| 74 | output_offset: &mut usize, |
| 75 | ) -> DivansOutputResult; |
| 76 | #[inline(always)] |
| 77 | fn push_consumed_data( |
| 78 | &mut self, |
| 79 | data:&mut AllocatedMemoryRange<u8, AllocU8>, |
| 80 | m8: Option<&mut RepurposingAlloc<u8, AllocU8>>, |
| 81 | ) -> DivansOutputResult; |
| 82 | #[inline(always)] |
| 83 | fn push_eof( |
| 84 | &mut self, |
| 85 | ) -> DivansOutputResult; |
| 86 | fn broadcast_err(&mut self, err:ErrMsg); |
| 87 | } |
| 88 | pub const NUM_SERIAL_COMMANDS_BUFFERED: usize = 256; |
| 89 | pub struct SerialWorker<AllocU8:Allocator<u8>, AllocCommand:Allocator<StaticCommand>> { |
| 90 | data_len: usize, |
nothing calls this directly
no outgoing calls
no test coverage detected