File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ use crate::error::{Error, Result};
44
55#[ allow( rustdoc:: invalid_rust_codeblocks) ]
66/// A borrowed BSON-spec cstring: Zero or more UTF-8 encoded characters, excluding the nul byte.
7- /// Most conveniently constructed via the [`cstr!`](crate::raw::cstr) macro.
7+ /// Can be constructed at compile-time via the [`cstr!`](crate::raw::cstr) macro or at run-time via
8+ /// the [`TryFrom`] impl.
89///
910/// Unlike [`std::ffi::CStr`], this is required to be valid UTF-8, and does not include the nul
1011/// terminator in the buffer:
@@ -169,7 +170,8 @@ macro_rules! cstr {
169170pub use cstr;
170171
171172/// An owned BSON-spec cstring: Zero or more UTF-8 encoded characters, excluding the nul byte.
172- /// `CString` is to `CStr` as [`String`] is to [`prim@str`].
173+ /// `CString` is to `CStr` as [`String`] is to [`prim@str`]. Can be constructed from a [`CStr`] via
174+ /// [`ToOwned`]/[`Into`] or from a [`String`] or [`prim@str`] via [`TryFrom`].
173175///
174176/// Like `CStr`, this differs from [`std::ffi::CString`] in that it is required to be valid UTF-8,
175177/// and does not include the nul terminator in the buffer.
You can’t perform that action at this time.
0 commit comments