| 265 | #[pyfunction] |
| 266 | #[pyo3(signature = (handle: "ScopeHandle", output: "object | None"=None, metadata: "object | None"=None, timestamp: "datetime.datetime | None"=None) -> "None", text_signature = "(handle: ScopeHandle, output: object | None = None, metadata: object | None = None, timestamp: datetime.datetime | None = None) -> None")] |
| 267 | fn pop_scope( |
| 268 | handle: &PyScopeHandle, |
| 269 | output: Option<&Bound<'_, PyAny>>, |
| 270 | metadata: Option<&Bound<'_, PyAny>>, |
| 271 | timestamp: Option<&Bound<'_, PyAny>>, |
| 272 | ) -> PyResult<()> { |
| 273 | let output = opt_py_to_json(output)?; |
| 274 | let metadata = opt_py_to_json(metadata)?; |
| 275 | let timestamp = opt_py_to_timestamp(timestamp)?; |
| 276 | core_scope_api::pop_scope( |
| 277 | core_scope_api::PopScopeParams::builder() |
| 278 | .handle_uuid(&handle.inner.uuid) |
| 279 | .output_opt(output) |
| 280 | .metadata_opt(metadata) |
| 281 | .timestamp_opt(timestamp) |
| 282 | .build(), |
| 283 | ) |
| 284 | .map_err(to_py_err) |
| 285 | } |
| 286 | |
| 287 | /// Emit a ``Mark`` event under the current or specified scope. |
| 288 | /// |