IsMockIncomplete reports whether the session's active mock has been marked incomplete. Parsers may use this to short-circuit expensive encoding work they know will be dropped.
()
| 218 | // marked incomplete. Parsers may use this to short-circuit expensive |
| 219 | // encoding work they know will be dropped. |
| 220 | func (s *Session) IsMockIncomplete() bool { |
| 221 | if s == nil { |
| 222 | return false |
| 223 | } |
| 224 | return s.mockIncomplete.Load() |
| 225 | } |
| 226 | |
| 227 | // EmitMock sends m to the mocks channel. If the session's active mock |
| 228 | // is marked incomplete, EmitMock returns nil without sending (the mock |