-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix doc warnings #2305
base: master
Are you sure you want to change the base?
Fix doc warnings #2305
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,7 +198,7 @@ where | |
ws.send(msg.into()).await | ||
} | ||
|
||
/// Await the initial [`ServerMessage::SubscriptionUpdate`]. | ||
/// Await the initial [`ws::ServerMessage::TransactionUpdateLight`] `|` [`ws::ServerMessage::TransactionUpdate`]. | ||
/// If `module_def` is `Some`, print a JSON representation to stdout. | ||
async fn await_initial_update<S>(ws: &mut S, module_def: Option<&RawModuleDefV9>) -> anyhow::Result<()> | ||
where | ||
|
@@ -232,7 +232,7 @@ where | |
Ok(()) | ||
} | ||
|
||
/// Print `num` [`ServerMessage::TransactionUpdate`] messages as JSON. | ||
/// Print `num` [`ws::ServerMessage::TransactionUpdateLight`] `|` [`ws::ServerMessage::TransactionUpdate`] messages as JSON. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we just say |
||
/// If `num` is `None`, keep going indefinitely. | ||
async fn consume_transaction_updates<S>( | ||
ws: &mut S, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
//! - You will probably need to add a new ID type in `spacetimedb_primitives`, | ||
//! with trait implementations in `spacetimedb_sats::{typespace, de::impl, ser::impl}`. | ||
//! - Add it to [`system_tables`], and define a constant for its index there. | ||
//! - Use [`st_fields_enum`] to define its column enum. | ||
//! - Use `st_fields_enum` to define its column enum. | ||
//! - Register its schema in [`system_module_def`], making sure to call `validate_system_table` at the end of the function. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sadly |
||
|
||
use crate::db::relational_db::RelationalDB; | ||
|
@@ -216,7 +216,7 @@ st_fields_enum!(enum StIndexFields { | |
}); | ||
// WARNING: For a stable schema, don't change the field names and discriminants. | ||
st_fields_enum!( | ||
/// The fields that define the internal table [crate::db::relational_db::ST_SEQUENCES_NAME]. | ||
/// The fields that define the internal table [ST_SEQUENCE_NAME]. | ||
enum StSequenceFields { | ||
"sequence_id", SequenceId = 0, | ||
"sequence_name", SequenceName = 1, | ||
|
@@ -859,13 +859,13 @@ impl From<Identity> for IdentityViaU256 { | |
/// * `database_identity` is the [`Identity`] of the database. | ||
/// * `owner_identity` is the [`Identity`] of the owner of the database. | ||
/// * `program_kind` is the [`ModuleKind`] (currently always [`WASM_MODULE`]). | ||
/// * `program_hash` is the [`Hash`] of the raw bytes of the (compiled) module. | ||
/// * `program_hash` is the [`struct@Hash`] of the raw bytes of the (compiled) module. | ||
/// * `program_bytes` are the raw bytes of the (compiled) module. | ||
/// * `module_version` is the version of the module. | ||
/// | ||
/// | identity | owner_identity | program_kind | program_bytes | program_hash | module_version | | ||
/// |------------------|----------------|---------------|---------------|---------------------|----------------| | ||
/// | <bytes> | <bytes> | 0 | <bytes> | <bytes> | <string> | | ||
/// | `<bytes>` | `<bytes>` | 0 | `<bytes>` | `<bytes>` | `<string>` | | ||
#[derive(Clone, Debug, Eq, PartialEq, SpacetimeType)] | ||
#[sats(crate = spacetimedb_lib)] | ||
pub struct StModuleRow { | ||
|
@@ -898,9 +898,9 @@ pub fn read_identity_from_col(row: RowRef<'_>, col: impl StFields) -> Result<Ide | |
Ok(Identity::from_u256(row.read_col(col.col_id())?)) | ||
} | ||
|
||
/// Read a [`Hash`] directly from the column `col` in `row`. | ||
/// Read a [`struct@Hash`] directly from the column `col` in `row`. | ||
/// | ||
/// The [`Hash`] is assumed to be stored as a flat byte array. | ||
/// The [`struct@Hash`] is assumed to be stored as a flat byte array. | ||
pub fn read_hash_from_col(row: RowRef<'_>, col: impl StFields) -> Result<Hash, DBError> { | ||
Ok(Hash::from_u256(row.read_col(col.col_id())?)) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,7 +251,7 @@ impl WasmInstanceEnv { | |
/// host call, to provide consistent error handling and instrumentation. | ||
/// | ||
/// This method should be used as opposed to a manual implementation, | ||
/// as it helps with upholding the safety invariants of [`bindings_sys::call`]. | ||
/// as it helps with upholding the safety invariants of `spacetimedb_bindings_sys::call`. | ||
/// | ||
/// Returns an error if writing `T` to `out` errors. | ||
fn cvt_ret<O: WasmPointee>( | ||
|
@@ -379,7 +379,7 @@ impl WasmInstanceEnv { | |
/// Starts iteration on each row, as BSATN-encoded, of a table identified by `table_id`. | ||
/// | ||
/// On success, the iterator handle is written to the `out` pointer. | ||
/// This handle can be advanced by [`row_iter_bsatn_advance`]. | ||
/// This handle can be advanced by [`Self::row_iter_bsatn_advance`]. | ||
/// | ||
/// # Traps | ||
/// | ||
|
@@ -436,7 +436,7 @@ impl WasmInstanceEnv { | |
/// which is unique for the module. | ||
/// | ||
/// On success, the iterator handle is written to the `out` pointer. | ||
/// This handle can be advanced by [`row_iter_bsatn_advance`]. | ||
/// This handle can be advanced by [`Self::row_iter_bsatn_advance`]. | ||
/// | ||
/// # Non-obvious queries | ||
/// | ||
|
@@ -783,7 +783,7 @@ impl WasmInstanceEnv { | |
/// in WASM memory. | ||
/// | ||
/// This syscall will delete all the rows found by | ||
/// [`datastore_index_scan_range_bsatn`] with the same arguments passed, | ||
/// [`Self::datastore_index_scan_range_bsatn`] with the same arguments passed, | ||
/// including `prefix_elems`. | ||
/// See `datastore_index_scan_range_bsatn` for details. | ||
/// | ||
|
@@ -1089,7 +1089,7 @@ impl WasmInstanceEnv { | |
} | ||
|
||
/// Logs at `level` a `message` message occuring in `filename:line_number` | ||
/// with [`target`](target) being the module path at the `log!` invocation site. | ||
/// with [`target`](https://docs.rs/log/latest/log/struct.Record.html#method.target) being the module path at the `log!` invocation site. | ||
/// | ||
/// These various pointers are interpreted lossily as UTF-8 strings with a corresponding `_len`. | ||
/// | ||
|
@@ -1107,8 +1107,6 @@ impl WasmInstanceEnv { | |
/// - `target` is not NULL and `target_ptr[..target_len]` is not in bounds of WASM memory. | ||
/// - `filename` is not NULL and `filename_ptr[..filename_len]` is not in bounds of WASM memory. | ||
/// - `message` is not NULL and `message_ptr[..message_len]` is not in bounds of WASM memory. | ||
/// | ||
/// [target]: https://docs.rs/log/latest/log/struct.Record.html#method.target | ||
#[tracing::instrument(level = "trace", skip_all)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not understood by |
||
pub fn console_log( | ||
caller: Caller<'_, Self>, | ||
|
@@ -1154,7 +1152,7 @@ impl WasmInstanceEnv { | |
|
||
/// Begins a timing span with `name = name_ptr[..name_len]`. | ||
/// | ||
/// When the returned `ConsoleTimerId` is passed to [`console_timer_end`], | ||
/// When the returned `ConsoleTimerId` is passed to [`Self::console_timer_end`], | ||
/// the duration between the calls will be printed to the module's logs. | ||
/// | ||
/// The `name` is interpreted lossily as a UTF-8 string. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the
InitialSubscription
case? It looks it has aDatabaseUpdate
or something like that?(Does this function even need a doc comment? I don't think we generate any docs for this)