Struct biome_formatter::BestFitting
source · pub struct BestFitting<'a, Context> { /* private fields */ }
Expand description
The first variant is the most flat, and the last is the most expanded variant.
See best_fitting!
macro for a more in-detail documentation
Implementations§
source§impl<'a, Context> BestFitting<'a, Context>
impl<'a, Context> BestFitting<'a, Context>
sourcepub unsafe fn from_arguments_unchecked(variants: Arguments<'a, Context>) -> Self
pub unsafe fn from_arguments_unchecked(variants: Arguments<'a, Context>) -> Self
Creates a new best fitting IR with the given variants. The method itself isn’t unsafe but it is to discourage people from using it because the printer will panic if the slice doesn’t contain at least the least and most expanded variants.
You’re looking for a way to create a BestFitting
object, use the best_fitting![least_expanded, most_expanded]
macro.
§Safety
The slice must contain at least two variants.
Trait Implementations§
source§impl<'a, Context: Clone> Clone for BestFitting<'a, Context>
impl<'a, Context: Clone> Clone for BestFitting<'a, Context>
source§fn clone(&self) -> BestFitting<'a, Context>
fn clone(&self) -> BestFitting<'a, Context>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Context> Format<Context> for BestFitting<'_, Context>
impl<Context> Format<Context> for BestFitting<'_, Context>
impl<'a, Context: Copy> Copy for BestFitting<'a, Context>
Auto Trait Implementations§
impl<'a, Context> Freeze for BestFitting<'a, Context>
impl<'a, Context> RefUnwindSafe for BestFitting<'a, Context>
impl<'a, Context> !Send for BestFitting<'a, Context>
impl<'a, Context> !Sync for BestFitting<'a, Context>
impl<'a, Context> Unpin for BestFitting<'a, Context>
impl<'a, Context> UnwindSafe for BestFitting<'a, Context>
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