Skip to content

Commit bba3378

Browse files
committed
Hide wasm-only DbConnection methods in native docs
1 parent d10a591 commit bba3378

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

crates/codegen/src/rust.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,11 +1374,11 @@ impl __sdk::InModule for RemoteTables {{
13741374
/// You must explicitly advance the connection by calling any one of:
13751375
///
13761376
/// - [`DbConnection::frame_tick`].
1377-
/// - [`DbConnection::run_threaded`].
1378-
/// - [`DbConnection::run_background_task`].
1377+
#[cfg_attr(not(target_arch = \"wasm32\"), doc = \"- [`DbConnection::run_threaded`].\")]
1378+
#[cfg_attr(target_arch = \"wasm32\", doc = \"- [`DbConnection::run_background_task`].\")]
13791379
/// - [`DbConnection::run_async`].
13801380
/// - [`DbConnection::advance_one_message`].
1381-
/// - [`DbConnection::advance_one_message_blocking`].
1381+
#[cfg_attr(not(target_arch = \"wasm32\"), doc = \"- [`DbConnection::advance_one_message_blocking`].\")]
13821382
/// - [`DbConnection::advance_one_message_async`].
13831383
///
13841384
/// Which of these methods you should call depends on the specific needs of your application,

crates/codegen/tests/snapshots/codegen__codegen_rust.snap

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,11 +1805,17 @@ impl __sdk::InModule for RemoteTables {
18051805
/// You must explicitly advance the connection by calling any one of:
18061806
///
18071807
/// - [`DbConnection::frame_tick`].
1808-
/// - [`DbConnection::run_threaded`].
1809-
/// - [`DbConnection::run_background_task`].
1808+
#[cfg_attr(not(target_arch = "wasm32"), doc = "- [`DbConnection::run_threaded`].")]
1809+
#[cfg_attr(
1810+
target_arch = "wasm32",
1811+
doc = "- [`DbConnection::run_background_task`]."
1812+
)]
18101813
/// - [`DbConnection::run_async`].
18111814
/// - [`DbConnection::advance_one_message`].
1812-
/// - [`DbConnection::advance_one_message_blocking`].
1815+
#[cfg_attr(
1816+
not(target_arch = "wasm32"),
1817+
doc = "- [`DbConnection::advance_one_message_blocking`]."
1818+
)]
18131819
/// - [`DbConnection::advance_one_message_async`].
18141820
///
18151821
/// Which of these methods you should call depends on the specific needs of your application,

0 commit comments

Comments
 (0)