Skip to content

Commit 0f3fdb0

Browse files
committed
Make string module public
1 parent 79d438a commit 0f3fdb0

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ mod multi;
8282
mod scope;
8383
mod state;
8484
mod stdlib;
85-
mod string;
8685
mod thread;
8786
mod traits;
8887
mod types;
@@ -94,6 +93,7 @@ mod vector;
9493
pub mod debug;
9594
pub mod function;
9695
pub mod prelude;
96+
pub mod string;
9797
pub mod table;
9898

9999
pub use bstr::BString;
@@ -106,7 +106,7 @@ pub use crate::multi::{MultiValue, Variadic};
106106
pub use crate::scope::Scope;
107107
pub use crate::state::{GCMode, Lua, LuaOptions, WeakLua};
108108
pub use crate::stdlib::StdLib;
109-
pub use crate::string::{BorrowedBytes, BorrowedStr, LuaString, LuaString as String};
109+
pub use crate::string::{BorrowedBytes, BorrowedStr, LuaString};
110110
pub use crate::table::Table;
111111
pub use crate::thread::{Thread, ThreadStatus};
112112
pub use crate::traits::{
@@ -122,6 +122,9 @@ pub use crate::userdata::{
122122
};
123123
pub use crate::value::{Nil, Value};
124124

125+
#[doc(hidden)]
126+
pub use crate::string::LuaString as String;
127+
125128
#[cfg(not(feature = "luau"))]
126129
pub use crate::debug::HookTriggers;
127130

src/string.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
//! Lua string handling.
2+
//!
3+
//! This module provides types for working with Lua strings from Rust.
4+
//!
5+
//! # Main Types
6+
//!
7+
//! - [`LuaString`] - A handle to an internal Lua string (may not be valid UTF-8).
8+
//! - [`BorrowedStr`] - A borrowed `&str` view of a Lua string that holds a strong reference to the Lua state.
9+
//! - [`BorrowedBytes`] - A borrowed `&[u8]` view of a Lua string that holds a strong reference to the Lua state.
10+
111
use std::borrow::{Borrow, Cow};
212
use std::hash::{Hash, Hasher};
313
use std::ops::Deref;

0 commit comments

Comments
 (0)