pub struct WorksheetContext<'call> { /* private fields */ }Expand description
Capability token for a genuine worksheet-function callback.
It borrows the callback capability and cannot be constructed by ordinary safe code. It does not imply that every Excel call is legal.
Implementations§
Source§impl WorksheetContext<'_>
impl WorksheetContext<'_>
Sourcepub fn drain_dispatcher(&self) -> DispatchDrainReport
pub fn drain_dispatcher(&self) -> DispatchDrainReport
Drains one bounded batch containing only worksheet-compatible or pure work.
Source§impl<'call> WorksheetContext<'call>
impl<'call> WorksheetContext<'call>
Sourcepub fn active_sheet_id(&self) -> Result<u64, ExcelCallError>
pub fn active_sheet_id(&self) -> Result<u64, ExcelCallError>
Returns the internal ID of Excel’s active/front sheet.
This is deliberately not named “current”: the zero-argument
xlSheetId contract identifies the active/front sheet.
Sourcepub fn current_sheet_name(&self) -> Result<ExcelString, ExcelCallError>
pub fn current_sheet_name(&self) -> Result<ExcelString, ExcelCallError>
Returns the name of the current sheet, not the active sheet.
Source§impl<'call> WorksheetContext<'call>
impl<'call> WorksheetContext<'call>
Sourcepub fn is_cancellation_requested(&self) -> Result<bool, ExcelCallError>
pub fn is_cancellation_requested(&self) -> Result<bool, ExcelCallError>
Poll whether Excel has received a user cancellation/break request. This zero-argument form preserves a pending break request.
Sourcepub fn is_cancellation_requested_with(
&self,
mode: AbortCheckMode,
) -> Result<bool, ExcelCallError>
pub fn is_cancellation_requested_with( &self, mode: AbortCheckMode, ) -> Result<bool, ExcelCallError>
Poll cancellation while explicitly preserving or clearing a pending break.
Source§impl<'call> WorksheetContext<'call>
impl<'call> WorksheetContext<'call>
Sourcepub fn caller(&self) -> Result<ExcelOwnedValue<'call>, ExcelCallError>
pub fn caller(&self) -> Result<ExcelOwnedValue<'call>, ExcelCallError>
Returns Excel’s caller value with its Excel-owned result lifetime.
Source§impl<'call> WorksheetContext<'call>
impl<'call> WorksheetContext<'call>
Sourcepub fn coerce(
&self,
source: &ExcelOwnedValue<'call>,
target: CoerceTarget,
) -> Result<ExcelOwnedValue<'call>, ExcelCallError>
pub fn coerce( &self, source: &ExcelOwnedValue<'call>, target: CoerceTarget, ) -> Result<ExcelOwnedValue<'call>, ExcelCallError>
Converts an Excel-owned callback result to a requested root type.
The source remains owned by the caller and is not consumed or
released by xlCoerce; the returned root has its own xlFree
obligation encoded in ExcelOwnedValue.