Skip to content

Commit 26a67b1

Browse files
committed
chore: expose the apis.
1 parent 5161b39 commit 26a67b1

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

plugins/recent-doc/src/commands.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Drop for ComGuard {
5353
}
5454

5555
#[command]
56-
pub(crate) fn add_recent_document<R: Runtime>(_app: AppHandle<R>, _path: &str) -> Result<()> {
56+
pub fn add_recent_document<R: Runtime>(_app: AppHandle<R>, _path: &str) -> Result<()> {
5757
#[cfg(target_os = "windows")]
5858
unsafe {
5959
let _com_guard = ComGuard::new();
@@ -92,7 +92,7 @@ pub(crate) fn add_recent_document<R: Runtime>(_app: AppHandle<R>, _path: &str) -
9292
}
9393

9494
#[command]
95-
pub(crate) fn clear_recent_documents<R: Runtime>(_app: AppHandle<R>) -> Result<()> {
95+
pub fn clear_recent_documents<R: Runtime>(_app: AppHandle<R>) -> Result<()> {
9696
#[cfg(target_os = "windows")]
9797
unsafe {
9898
let _guard = ComGuard::new();
@@ -122,7 +122,7 @@ pub(crate) fn clear_recent_documents<R: Runtime>(_app: AppHandle<R>) -> Result<(
122122
}
123123

124124
#[command]
125-
pub(crate) fn get_recent_documents<R: Runtime>(_app: AppHandle<R>) -> Result<Vec<String>> {
125+
pub fn get_recent_documents<R: Runtime>(_app: AppHandle<R>) -> Result<Vec<String>> {
126126
#[allow(unused_mut)]
127127
let mut recent_docs = Vec::new();
128128

plugins/recent-doc/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
mod commands;
66
mod error;
77

8+
pub use commands::{add_recent_document, clear_recent_documents, get_recent_documents};
9+
10+
pub use error::{Error, Result};
11+
812
use tauri::{
913
plugin::{Builder, TauriPlugin},
1014
Runtime,

0 commit comments

Comments
 (0)