Skip to content

Commit 3011143

Browse files
committed
Expose Buffer needed for generated FIX definitions
1 parent 89af718 commit 3011143

5 files changed

Lines changed: 10 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/hotfix-message/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "hotfix-message"
33
description = "FIX messages for HotFIX."
4-
version.workspace = true
4+
version = "0.1.0"
55
authors.workspace = true
66
edition.workspace = true
77
license.workspace = true

crates/hotfix-message/src/encoding/buffer.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ pub trait Buffer {
2323
self.as_slice().len()
2424
}
2525

26+
/// Returns `true` if the buffer is empty.
27+
#[inline]
28+
fn is_empty(&self) -> bool {
29+
self.len() == 0
30+
}
31+
2632
/// Returns the number of bytes that `self` can hold without reallocating.
2733
fn capacity(&self) -> usize;
2834

crates/hotfix-message/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod parser;
88
pub(crate) mod parts;
99
mod tags;
1010

11-
use encoding::Buffer;
11+
pub use encoding::Buffer;
1212
pub use encoding::HardCodedFixFieldDefinition;
1313
pub use encoding::field_access::FieldType;
1414
pub use encoding::field_types;

crates/hotfix/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async-trait = { workspace = true }
2424
chrono = { workspace = true, features = ["serde"] }
2525
chrono-tz = { workspace = true, features = ["serde"] }
2626
futures = "^0.3.28"
27-
hotfix-message = { version = "0.0.26", path = "../hotfix-message" }
27+
hotfix-message = { version = "0.1.0", path = "../hotfix-message" }
2828
mongodb = { version = "^3.2", optional = true }
2929
pki-types = { package = "rustls-pki-types", version = "^1" }
3030
redb = { version = "^2.6", optional = true }

0 commit comments

Comments
 (0)