Skip to content

Commit 1b25b2e

Browse files
committed
make size limit public
Signed-off-by: Jay Lee <[email protected]>
1 parent a083fca commit 1b25b2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/codec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub type SerializeFn<T> = fn(&T, &mut Vec<u8>) -> Result<()>;
88

99
/// According to https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md, grpc uses
1010
/// a four bytes to describe the length of a message, so it should not exceed u32::MAX.
11-
const MAX_MESSAGE_SIZE: usize = u32::MAX as usize;
11+
pub const MAX_MESSAGE_SIZE: usize = u32::MAX as usize;
1212

1313
/// Defines how to serialize and deserialize between the specialized type and byte slice.
1414
pub struct Marshaller<T> {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub use crate::codec::pb_codec::{de as pb_de, ser as pb_ser};
6767
pub use crate::codec::pr_codec::{de as pr_de, ser as pr_ser};
6868

6969
pub use crate::auth_context::{AuthContext, AuthProperty, AuthPropertyIter};
70-
pub use crate::codec::Marshaller;
70+
pub use crate::codec::{Marshaller, MAX_MESSAGE_SIZE};
7171
pub use crate::env::{EnvBuilder, Environment};
7272
pub use crate::error::{Error, Result};
7373
pub use crate::log_util::redirect_log;

0 commit comments

Comments
 (0)