pub fn begin_capture() -> ConsoleCaptureGuardExpand description
Begin capturing command-window text for the current execution context.
While a capture is active, stdout/stderr entries are diverted into the
capture buffer instead of the normal execution stream, live forwarder, or
diary log. This matches MATLAB’s evalc behavior, where diary is disabled
inside the captured evaluation.