#[non_exhaustive]pub enum DangleAlign {
Prefix,
Open,
Close,
}Expand description
How to align the dangling closing paren.
Only takes effect when Config::dangle_parens is true.
Controls where ) is placed when a call wraps onto multiple lines.
At the top level (block depth = 0) Prefix and Close both place
the ) at column 0 because the command sits there — the two
variants are visually identical in this case:
# Prefix / Close at top level — `)` at column 0:
target_link_libraries(
mylib PUBLIC dep1
)
# Open — `)` at the opening-paren column:
target_link_libraries(
mylib PUBLIC dep1
)Inside a nested block (if/foreach/while/function/...) the
variants diverge: Prefix tracks the command-name indent (one
tab stop per nesting level), while Close places the ) at the
current indent level — one tab stop shallower than the command
name, i.e. flush with the enclosing block.
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.
Prefix
Align with the start of the command name.
Open
Align with the opening paren column.
Close
No extra indent (flush with current indent level).
Trait Implementations§
Source§impl Clone for DangleAlign
impl Clone for DangleAlign
Source§fn clone(&self) -> DangleAlign
fn clone(&self) -> DangleAlign
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 moreimpl Copy for DangleAlign
Source§impl Debug for DangleAlign
impl Debug for DangleAlign
Source§impl Default for DangleAlign
impl Default for DangleAlign
Source§fn default() -> DangleAlign
fn default() -> DangleAlign
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DangleAlign
impl<'de> Deserialize<'de> for DangleAlign
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DangleAlign
Source§impl JsonSchema for DangleAlign
impl JsonSchema for DangleAlign
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for DangleAlign
impl PartialEq for DangleAlign
Source§fn eq(&self, other: &DangleAlign) -> bool
fn eq(&self, other: &DangleAlign) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DangleAlign
impl Serialize for DangleAlign
impl StructuralPartialEq for DangleAlign
Auto Trait Implementations§
impl Freeze for DangleAlign
impl RefUnwindSafe for DangleAlign
impl Send for DangleAlign
impl Sync for DangleAlign
impl Unpin for DangleAlign
impl UnsafeUnpin for DangleAlign
impl UnwindSafe for DangleAlign
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
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
Compare self to
key and return true if they are equal.