pub struct format;
Expand description
Unstable variadic format function
ⓘ
builtin! fn format () -> IResult<ConValue>
{
use std::fmt::Write; let mut out = String::new(); for arg in args
{ write!(out, "{arg}").ok(); } Ok(ConValue::String(out.into()))
}
Trait Implementations§
Source§impl Callable for format
impl Callable for format
Source§fn call(&self, env: &mut Environment, args: &[ConValue]) -> IResult<ConValue>
fn call(&self, env: &mut Environment, args: &[ConValue]) -> IResult<ConValue>
Calls this Callable in the provided Environment, with ConValue args
The Callable is responsible for checking the argument count and validating types
The Callable is responsible for checking the argument count and validating types
Auto Trait Implementations§
impl Freeze for format
impl RefUnwindSafe for format
impl Send for format
impl Sync for format
impl Unpin for format
impl UnwindSafe for format
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