#[non_exhaustive]pub enum ContinuationAlign {
SameIndent,
UnderFirstValue,
}Expand description
How to indent continuation lines when a wrapped keyword section
overflows Config::line_width.
Suppose PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ exceeds the line budget under a
PATTERN *.h subgroup:
# SameIndent — continuation wraps at the subkwarg indent:
PATTERN *.h
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
# UnderFirstValue — continuation aligns under the first value
# after the keyword:
PATTERN *.h
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READcmakefmt defaults to ContinuationAlign::UnderFirstValue: when
a subkwarg group overflows, continuation lands under the first
value column so the eye can tell continuation values apart from
sibling subkwargs. This also matches cmake-format’s hanging-indent
style, easing migration. ContinuationAlign::SameIndent is
available for consumers who prefer continuation at the subkwarg’s
own column — consistent with how flat keyword sections
(PUBLIC/PRIVATE/…) and positional lists wrap elsewhere in the
formatter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SameIndent
Continuation lines wrap at the same indent as the keyword itself. Consistent with how the rest of the formatter wraps flat-list sections and positional argument lists.
UnderFirstValue
Continuation lines align under the first value after the keyword (cmake-format’s hanging-indent style). The default.
Trait Implementations§
Source§impl Clone for ContinuationAlign
impl Clone for ContinuationAlign
Source§fn clone(&self) -> ContinuationAlign
fn clone(&self) -> ContinuationAlign
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ContinuationAlign
Source§impl Debug for ContinuationAlign
impl Debug for ContinuationAlign
Source§impl Default for ContinuationAlign
impl Default for ContinuationAlign
Source§fn default() -> ContinuationAlign
fn default() -> ContinuationAlign
Source§impl<'de> Deserialize<'de> for ContinuationAlign
impl<'de> Deserialize<'de> for ContinuationAlign
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ContinuationAlign
Source§impl JsonSchema for ContinuationAlign
impl JsonSchema for ContinuationAlign
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ContinuationAlign
impl PartialEq for ContinuationAlign
Source§fn eq(&self, other: &ContinuationAlign) -> bool
fn eq(&self, other: &ContinuationAlign) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ContinuationAlign
impl Serialize for ContinuationAlign
impl StructuralPartialEq for ContinuationAlign
Source§impl ValueEnum for ContinuationAlign
impl ValueEnum for ContinuationAlign
Auto Trait Implementations§
impl Freeze for ContinuationAlign
impl RefUnwindSafe for ContinuationAlign
impl Send for ContinuationAlign
impl Sync for ContinuationAlign
impl Unpin for ContinuationAlign
impl UnsafeUnpin for ContinuationAlign
impl UnwindSafe for ContinuationAlign
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.