Make Limits struct fields publicly accessible
This commit is contained in:
1 parent
f6a91065d9
commit
3868f78067
1 file changed
+7
-2
+7
-2
@@ -129,10 +129,14 @@ pub struct Limits {
|
|||||||
/// 256MiB. If the entire image is decoded at once, then this will
|
/// 256MiB. If the entire image is decoded at once, then this will
|
||||||
/// be the maximum size of the image. If it is decoded one strip at a
|
/// be the maximum size of the image. If it is decoded one strip at a
|
||||||
/// time, this will be the maximum size of a strip.
|
/// time, this will be the maximum size of a strip.
|
||||||
decoding_buffer_size: usize,
|
pub decoding_buffer_size: usize,
|
||||||
/// The maximum size of any ifd value in bytes, the default is
|
/// The maximum size of any ifd value in bytes, the default is
|
||||||
/// 1MiB.
|
/// 1MiB.
|
||||||
ifd_value_size: usize,
|
pub ifd_value_size: usize,
|
||||||
|
/// The purpose of this is to prevent all the fields of the struct from
|
||||||
|
/// being public, as this would make adding new fields a major version
|
||||||
|
/// bump.
|
||||||
|
_non_exhaustive: (),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Limits {
|
impl Default for Limits {
|
||||||
@@ -140,6 +144,7 @@ impl Default for Limits {
|
|||||||
Limits {
|
Limits {
|
||||||
decoding_buffer_size: 256 * 1024 * 1024,
|
decoding_buffer_size: 256 * 1024 * 1024,
|
||||||
ifd_value_size: 1024 * 1024,
|
ifd_value_size: 1024 * 1024,
|
||||||
|
_non_exhaustive: (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user