Skip to content

Commit b80d5bd

Browse files
rust: make Wrtier::with_options pub (#1351)
### Changelog <!-- Write a one-sentence summary of the user-impacting change (API, UI/UX, performance, etc) that could appear in a changelog. Write "None" if there is no user-facing change --> Make `Writher::with_options` public ### Docs <!-- Link to a Docs PR, tracking ticket in Linear, OR write "None" if no documentation changes are needed. --> None ### Description Makes the `Writer::with_options` method in the Rust library public to easier support setting options. This also bumps the version to 0.16.0 in preparation to release this and the breaking changes from #1341. Fixes #1348.
1 parent 50cea9a commit b80d5bd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rust/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ categories = [ "science::robotics", "compression" ]
77
repository = "https://github.com/foxglove/mcap"
88
documentation = "https://docs.rs/mcap"
99
readme = "README.md"
10-
version = "0.15.1"
10+
version = "0.16.0"
1111
edition = "2021"
1212
license = "MIT"
1313

rust/src/write.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,13 @@ pub struct Writer<W: Write + Seek> {
390390
}
391391

392392
impl<W: Write + Seek> Writer<W> {
393+
/// Create a new MCAP [`Writer`] using the provided seeking writer.
393394
pub fn new(writer: W) -> McapResult<Self> {
394395
Self::with_options(writer, WriteOptions::default())
395396
}
396397

397-
fn with_options(writer: W, opts: WriteOptions) -> McapResult<Self> {
398+
/// Create a new MCAP [`Writer`] using the provided seeking writer and [`WriteOptions`].
399+
pub fn with_options(writer: W, opts: WriteOptions) -> McapResult<Self> {
398400
let mut writer = CountingCrcWriter::new(writer, opts.calculate_data_section_crc);
399401
writer.write_all(MAGIC)?;
400402

0 commit comments

Comments
 (0)