Skip to content

Commit

Permalink
Improve docs. Bump version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-graj committed Jul 25, 2024
1 parent ef41994 commit 0e32e48
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin-proto-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bin-proto-derive"
version = "0.4.2"
version = "0.5.0"
authors = [
"Wojciech Graj <[email protected]>",
"Dylan McKay <[email protected]>"
Expand Down
4 changes: 2 additions & 2 deletions bin-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bin-proto"
version = "0.4.2"
version = "0.5.0"
authors = [
"Wojciech Graj <[email protected]>",
"Dylan McKay <[email protected]>"
Expand All @@ -20,6 +20,6 @@ default = ["derive"]
derive = ["bin-proto-derive"]

[dependencies]
bin-proto-derive = { version = "0.4.2", path = "../bin-proto-derive", optional = true }
bin-proto-derive = { version = "0.5.0", path = "../bin-proto-derive", optional = true }
bitstream-io = "2.3.0"
thiserror = "1.0.61"
2 changes: 1 addition & 1 deletion bin-proto/src/discriminable.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// A trait for types with discriminants (typically Enums).
/// A trait for types with discriminants. Automatically derived for `enum`s.
pub trait Discriminable {
type Discriminant;

Expand Down
6 changes: 3 additions & 3 deletions bin-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub use self::tagged::{TaggedRead, UntaggedWrite};
///
/// Determine width of field in bits.
///
/// **WARNING**: Bitfields disregard ByteOrder and instead have the same
/// **WARNING**: Bitfields disregard `ByteOrder` and instead have the same
/// endianness as the underlying `BitRead` / `BitWrite` instance. If you're
/// using bitfields, you almost always want a big endian stream.
///
Expand Down Expand Up @@ -187,9 +187,9 @@ pub use self::tagged::{TaggedRead, UntaggedWrite};
/// }
/// ```
///
/// ## `[#protocol(ctx = "<ty>")]`
/// ## `[#protocol(ctx = "<type>")]`
/// - Applies to: containers
/// - `<ty>`: The type of the context. Either a concrete type, or one of the
/// - `<type>`: The type of the context. Either a concrete type, or one of the
/// container's generics
///
/// Specify the type of context that will be passed to codec functions
Expand Down
4 changes: 2 additions & 2 deletions bin-proto/src/tagged.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
use crate::{BitRead, BitWrite, ByteOrder, Result};

/// A trait for variable-length types with a disjoint length prefix.
/// A trait for decoding variable-length types with a disjoint length prefix.
pub trait TaggedRead<Tag, Ctx = ()>: Sized {
fn read(read: &mut dyn BitRead, byte_order: ByteOrder, ctx: &mut Ctx, tag: Tag)
-> Result<Self>;
}

/// A trait for variable-length types with a disjoint length prefix.
/// A trait for encoding variable-length types with a disjoint length prefix.
pub trait UntaggedWrite<Ctx = ()>: Sized {
fn write(&self, write: &mut dyn BitWrite, byte_order: ByteOrder, ctx: &mut Ctx) -> Result<()>;
}
Expand Down

0 comments on commit 0e32e48

Please sign in to comment.