#[non_exhaustive]pub enum InlinePolicy {
Never,
LeafIfFits(usize),
}Expand description
When maps and sequences are written on a single line in indented output.
Maps and sequences with the Layout::Compact
hint are always written on a single line, the ones with
Layout::Expanded never (unless they are in a
map or sequence on a single line). See SerializerConfig::set_inline.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Never
Only compact maps and sequences are written on a single line.
LeafIfFits(usize)
Maps and sequences which only contain scalars (no maps or sequences, not even empty ones) are written on a single line if that line is not longer than the given number of characters (including the indentation, a tab counts as one character).
Trait Implementations§
Source§impl Clone for InlinePolicy
impl Clone for InlinePolicy
impl Copy for InlinePolicy
Source§impl Debug for InlinePolicy
impl Debug for InlinePolicy
Source§impl Default for InlinePolicy
impl Default for InlinePolicy
impl Eq for InlinePolicy
Source§impl Hash for InlinePolicy
impl Hash for InlinePolicy
Source§impl PartialEq for InlinePolicy
impl PartialEq for InlinePolicy
impl StructuralPartialEq for InlinePolicy
Auto Trait Implementations§
impl Freeze for InlinePolicy
impl RefUnwindSafe for InlinePolicy
impl Send for InlinePolicy
impl Sync for InlinePolicy
impl Unpin for InlinePolicy
impl UnsafeUnpin for InlinePolicy
impl UnwindSafe for InlinePolicy
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