pub struct SizeEnforcerConfig {
pub enabled: bool,
pub max_size: usize,
pub size_unit: String,
pub preserve_sentences: bool,
pub min_split_size_ratio: f32,
pub recursive: bool,
pub max_iterations: usize,
pub split_direction: String,
}Fields§
§enabled: boolWhether size enforcement is enabled
max_size: usizeMaximum allowed size for any single node
size_unit: StringWhat to measure: “characters”, “words”, or “bytes”
preserve_sentences: boolEnsure sentence boundaries are respected when splitting
min_split_size_ratio: f32Minimum size of resulting chunks (as ratio of max_size)
recursive: boolEnable recursive splitting until all nodes are compliant
max_iterations: usizeSafety limit for recursive splitting
split_direction: StringHow to split bounding boxes: “horizontal” (side-by-side) or “vertical” (stacked)
Trait Implementations§
Source§impl Clone for SizeEnforcerConfig
impl Clone for SizeEnforcerConfig
Source§fn clone(&self) -> SizeEnforcerConfig
fn clone(&self) -> SizeEnforcerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SizeEnforcerConfig
impl Debug for SizeEnforcerConfig
Source§impl Default for SizeEnforcerConfig
impl Default for SizeEnforcerConfig
Source§fn default() -> SizeEnforcerConfig
fn default() -> SizeEnforcerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SizeEnforcerConfig
impl<'de> Deserialize<'de> for SizeEnforcerConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SizeEnforcerConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SizeEnforcerConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SizeEnforcerConfig
impl Serialize for SizeEnforcerConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SizeEnforcerConfig
impl RefUnwindSafe for SizeEnforcerConfig
impl Send for SizeEnforcerConfig
impl Sync for SizeEnforcerConfig
impl Unpin for SizeEnforcerConfig
impl UnsafeUnpin for SizeEnforcerConfig
impl UnwindSafe for SizeEnforcerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more