pub struct Formatter(/* private fields */);
Expand description
And instance of a formatter for ${plugin_status_key:**}/__version__
.
Implementations§
Source§impl Formatter
impl Formatter
pub fn plugin_status_key<S: Display>( &mut self, value: S, ) -> Result<&mut Self, FormatSetError>
Methods from Deref<Target = KeFormatter<'static, [Segment<'static>; 1]>>§
Sourcepub fn clear(&mut self) -> &mut KeFormatter<'s, Storage>
pub fn clear(&mut self) -> &mut KeFormatter<'s, Storage>
Clear the formatter of previously set values, without deallocating its internal formatting buffer.
Sourcepub fn build(&self) -> Result<OwnedKeyExpr, Box<dyn Error + Send + Sync>>
pub fn build(&self) -> Result<OwnedKeyExpr, Box<dyn Error + Send + Sync>>
Build a key-expression according to the format and the currently set values.
This doesn’t clear the formatter of already set values, allowing to reuse the builder and only change a subset of its properties before building a new key-expression again.
Sourcepub fn set<S>(
&mut self,
id: &str,
value: S,
) -> Result<&mut KeFormatter<'s, Storage>, FormatSetError>where
S: Display,
pub fn set<S>(
&mut self,
id: &str,
value: S,
) -> Result<&mut KeFormatter<'s, Storage>, FormatSetError>where
S: Display,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Formatter
impl RefUnwindSafe for Formatter
impl Send for Formatter
impl Sync for Formatter
impl Unpin for Formatter
impl UnwindSafe for Formatter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more