Mountain/IPC/WindServiceHandlers/Navigation/HistoryGoBack.rs
1#![allow(non_snake_case)]
2
3//! Pop the previous URI off the back-stack and return it.
4//! `None` when the stack is empty (caller should disable the
5//! back button).
6
7use std::sync::Arc;
8
9use serde_json::Value;
10
11use crate::RunTime::ApplicationRunTime::ApplicationRunTime;
12
13pub async fn HistoryGoBack(RunTime:Arc<ApplicationRunTime>) -> Result<Value, String> {
14 let Uri = RunTime.Environment.ApplicationState.Feature.NavigationHistory.GoBack();
15 Ok(Uri.map(Value::String).unwrap_or(Value::Null))
16}