Struct biome_formatter::Arguments
source · pub struct Arguments<'fmt, Context>(pub &'fmt [Argument<'fmt, Context>]);
Expand description
Sequence of objects that should be formatted in the specified order.
The format_args!
macro will safely create an instance of this structure.
You can use the Arguments<a>
that [format_args!]
return in Format
context as seen below.
It will call the format
function for every of it’s objects.
use biome_formatter::prelude::*;
use biome_formatter::{format, format_args};
let formatted = format!(SimpleFormatContext::default(), [
format_args!(text("a"), space(), text("b"))
])?;
assert_eq!("a b", formatted.print()?.as_code());
Tuple Fields§
§0: &'fmt [Argument<'fmt, Context>]
Implementations§
Trait Implementations§
impl<Context> Copy for Arguments<'_, Context>
Auto Trait Implementations§
impl<'fmt, Context> Freeze for Arguments<'fmt, Context>
impl<'fmt, Context> RefUnwindSafe for Arguments<'fmt, Context>
impl<'fmt, Context> !Send for Arguments<'fmt, Context>
impl<'fmt, Context> !Sync for Arguments<'fmt, Context>
impl<'fmt, Context> Unpin for Arguments<'fmt, Context>
impl<'fmt, Context> UnwindSafe for Arguments<'fmt, 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