• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitcoindevkit / bdk / 8968819480

06 May 2024 12:09PM CUT coverage: 82.273%. Remained the same
8968819480

push

github

evanlinjin
Merge bitcoindevkit/bdk#1427: docs(esplora): fixed `full_scan` and `sync` documentation

<a class=hub.com/bitcoindevkit/bdk/commit/<a class="double-link" href="https://git"><a class=hub.com/bitcoindevkit/bdk/commit/f6dc6890c37752e80c86c68ae3ca3cc4fac6245e">f6dc6890c docs(esplora): fixed `full_scan` and `sync` documentation (Wei Chen)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  Fixed documentation for `full_scan` and `sync` in `bdk_esplora`.

  ### Changelog notice

  <!-- Notice the release manager should include in the release tag message changelog -->
  <!-- See https://keepachangelog.com/en/1.0.0/ for examples -->
  * Updated documentation for `full_scan` and `sync` in `bdk_esplora`.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  evanlinjin:
    ACK f6dc6890c37752e80c86c68ae3ca3cc4fac6245e
  storopoli:
    ACK f6dc6890c37752e80c86c68ae3ca3cc4fac6245e

Tree-SHA512: 900fb1a280a72ee1e13c5c70a136b93f332

10396 of 12636 relevant lines covered (82.27%)

17655.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
/crates/file_store/src/lib.rs
1
#![doc = include_str!("../README.md")]
2
mod entry_iter;
3
mod store;
4
use std::io;
5

6
use bincode::{DefaultOptions, Options};
7
pub use entry_iter::*;
8
pub use store::*;
9

10
pub(crate) fn bincode_options() -> impl bincode::Options {
924✔
11
    DefaultOptions::new().with_varint_encoding()
924✔
12
}
924✔
13

14
/// Error that occurs due to problems encountered with the file.
15
#[derive(Debug)]
16
pub enum FileError {
17
    /// IO error, this may mean that the file is too short.
18
    Io(io::Error),
19
    /// Magic bytes do not match what is expected.
20
    InvalidMagicBytes { got: Vec<u8>, expected: Vec<u8> },
21
}
22

23
impl core::fmt::Display for FileError {
24
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
×
25
        match self {
×
26
            Self::Io(e) => write!(f, "io error trying to read file: {}", e),
×
27
            Self::InvalidMagicBytes { got, expected } => write!(
×
28
                f,
×
29
                "file has invalid magic bytes: expected={:?} got={:?}",
×
30
                expected, got,
×
31
            ),
×
32
        }
33
    }
×
34
}
35

36
impl From<io::Error> for FileError {
37
    fn from(value: io::Error) -> Self {
2✔
38
        Self::Io(value)
2✔
39
    }
2✔
40
}
41

42
impl std::error::Error for FileError {}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc