Skip to content

Commit

Permalink
DOC: Document when Ok(None) is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
threecgreen committed Oct 9, 2023
1 parent 84bc69e commit 2e0d9b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion rust/dbn/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ use crate::{

/// Trait for types that decode references to DBN records of a dynamic type.
pub trait DecodeRecordRef {
/// Tries to decode a generic reference a record.
/// Tries to decode a generic reference a record. Returns `Ok(None)` if input
/// has been exhausted.
///
/// # Errors
/// This function returns an error if the underlying reader returns an error of a
Expand Down
4 changes: 2 additions & 2 deletions rust/dbn/src/decode/dbn/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ where
}

/// Tries to decode a single record and returns a reference to the record that
/// lasts until the next method call. Returns `None` if `reader` has been
/// lasts until the next method call. Returns `Ok(None)` if `reader` has been
/// exhausted.
///
/// # Errors
Expand All @@ -80,7 +80,7 @@ where
}

/// Tries to decode a single record and returns a reference to the record that
/// lasts until the next method call. Returns `None` if `reader` has been
/// lasts until the next method call. Returns `Ok(None)` if `reader` has been
/// exhausted.
///
/// # Errors
Expand Down
3 changes: 2 additions & 1 deletion rust/dbn/src/decode/dbn/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ where
}
}

/// Tries to decode a generic reference a record.
/// Tries to decode a generic reference a record. Returns `Ok(None)` if
/// the reader is exhausted.
///
/// # Errors
/// This function returns an error if the underlying reader returns an
Expand Down

0 comments on commit 2e0d9b1

Please sign in to comment.