#[non_exhaustive]pub enum ArgValue {
Str(Text),
Int(i64),
Float(f64),
Decimal(Text),
DateTime(Arc<DateTimeValue>),
Custom(Arc<dyn CustomValue + Send + Sync>),
Source(Arc<dyn ArgSource>),
Unset,
}Expand description
The call-site core: what tr! builds, and what formats it against a
catalog the caller supplies.
The call-site core: what tr! builds, and what formats it against a
catalog the caller supplies.
The call-site core: what tr! builds, and what formats it against a
catalog the caller supplies.
One positional argument of a call site: owned, 'static and
Send + Sync, so a description can sit in a const, cross a thread, or
wait in a registry until something renders it.
Every variant is borrowed into one Arg.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Str(Text)
A string.
Int(i64)
An integer.
Float(f64)
A float.
Decimal(Text)
An exact decimal as number-literal text (-12.50, 1e3).
DateTime(Arc<DateTimeValue>)
A date/time.
Custom(Arc<dyn CustomValue + Send + Sync>)
An application value: what carries a measure, a date or a value a
custom function downcasts (CustomValue).
Source(Arc<dyn ArgSource>)
A value read at format time (ArgSource).
Unset
No value: the message reports an Unresolved Variable, as the spec requires.
Implementations§
Source§impl ArgValue
impl ArgValue
Trait Implementations§
Source§impl Debug for ArgValue
Every variant as written, but for the two whose value is the
application’s own and has no Debug to call: Custom(..), Source(..).
impl Debug for ArgValue
Every variant as written, but for the two whose value is the
application’s own and has no Debug to call: Custom(..), Source(..).
Source§impl From<&OsString> for ArgValue
Available on crate feature host-std, or crate feature native, or (crate features csr or hydrate or ssr) and (crate features leptos-0-8 or leptos) only.As &PathBuf.
impl From<&OsString> for ArgValue
host-std, or crate feature native, or (crate features csr or hydrate or ssr) and (crate features leptos-0-8 or leptos) only.As &PathBuf.
Source§impl From<&PathBuf> for ArgValue
Available on crate feature host-std, or crate feature native, or (crate features csr or hydrate or ssr) and (crate features leptos-0-8 or leptos) only.Beside &T for T: IntoArg + Copy, a reference to a type that is not
Copy cannot be an IntoArg; tr! takes it through this.
impl From<&PathBuf> for ArgValue
host-std, or crate feature native, or (crate features csr or hydrate or ssr) and (crate features leptos-0-8 or leptos) only.Beside &T for T: IntoArg + Copy, a reference to a type that is not
Copy cannot be an IntoArg; tr! takes it through this.
Source§impl From<&Zoned> for ArgValue
Available on crate feature native only.As Zoned: Zoned is not Copy, so its reference is not an IntoArg
(and would otherwise be taken as its text).
impl From<&Zoned> for ArgValue
native only.As Zoned: Zoned is not Copy, so its reference is not an IntoArg
(and would otherwise be taken as its text).
Source§impl From<&str> for ArgValue
Any string slice, copied: a call site’s &str is rarely 'static
(user.name()), and a description outlives the call. A literal keeps its
&'static str through ArgValue::str_static, which is what the macro
emits for one.
impl From<&str> for ArgValue
Any string slice, copied: a call site’s &str is rarely 'static
(user.name()), and a description outlives the call. A literal keeps its
&'static str through ArgValue::str_static, which is what the macro
emits for one.
Source§impl<T> From<ArcReadSignal<T>> for ArgValue
Available on crate features csr or hydrate or ssr only.
impl<T> From<ArcReadSignal<T>> for ArgValue
csr or hydrate or ssr only.Source§fn from(signal: ArcReadSignal<T>) -> ArgValue
fn from(signal: ArcReadSignal<T>) -> ArgValue
Source§impl<T> From<ArcRwSignal<T>> for ArgValue
Available on crate features csr or hydrate or ssr only.
impl<T> From<ArcRwSignal<T>> for ArgValue
csr or hydrate or ssr only.Source§fn from(signal: ArcRwSignal<T>) -> ArgValue
fn from(signal: ArcRwSignal<T>) -> ArgValue
Source§impl<T> From<ArcSignal<T>> for ArgValue
Available on crate features csr or hydrate or ssr only.
impl<T> From<ArcSignal<T>> for ArgValue
csr or hydrate or ssr only.Source§impl From<DateTimeValue> for ArgValue
impl From<DateTimeValue> for ArgValue
Source§fn from(d: DateTimeValue) -> ArgValue
fn from(d: DateTimeValue) -> ArgValue
Source§impl<T> From<ReadSignal<T>> for ArgValue
Available on crate features csr or hydrate or ssr only.
impl<T> From<ReadSignal<T>> for ArgValue
csr or hydrate or ssr only.Source§fn from(signal: ReadSignal<T>) -> ArgValue
fn from(signal: ReadSignal<T>) -> ArgValue
Source§impl<T> From<RwSignal<T>> for ArgValue
Available on crate features csr or hydrate or ssr only.
impl<T> From<RwSignal<T>> for ArgValue
csr or hydrate or ssr only.Auto Trait Implementations§
impl !RefUnwindSafe for ArgValue
impl !UnwindSafe for ArgValue
impl Freeze for ArgValue
impl Send for ArgValue
impl Sync for ArgValue
impl Unpin for ArgValue
impl UnsafeUnpin for ArgValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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