pub struct VarAttr {Show 15 fields
pub kind: VarKind,
pub readonly: bool,
pub export: bool,
pub left_pad: Option<usize>,
pub right_pad: Option<usize>,
pub zero_pad: Option<usize>,
pub uppercase: bool,
pub lowercase: bool,
pub unique: bool,
pub float_exp: bool,
pub int_base: Option<u32>,
pub hidden: bool,
pub hide_val: bool,
pub trace: bool,
pub float_precision: Option<usize>,
}Expand description
Variable attribute record for (t) flag introspection. Mirrors
the type+flag bitmask zsh tracks per Param. Each instance picks
exactly one base kind plus zero-or-more attribute markers.
Fields§
§kind: VarKind§readonly: bool§export: bool§left_pad: Option<usize>§right_pad: Option<usize>§zero_pad: Option<usize>§uppercase: bool§lowercase: bool§unique: booltypeset -U arr — array dedupes its elements on assignment /
append, keeping the first occurrence. zsh-only.
float_exp: booltypeset -E — float in scientific notation (vs -F for fixed).
Distinguished from VarKind::Float for declare -p printing
(-E vs -F flag letter).
int_base: Option<u32>typeset -i N — display integer in base N (2-36). Stored value
is decimal; the N#DIGITS form is computed on read.
typeset -h — hidden flag (zsh PM_HIDE). zsh hides such names
from declarative listings (set, default typeset); they still
expand normally.
hide_val: booltypeset -H — hide-value flag (zsh PM_HIDEVAL). Listings show
the name (so typeset -p is round-trippable) but suppress the
stored value.
trace: booltypeset -t — trace flag (zsh PM_TRACED). Mutations should log
+ NAME=VALUE to stderr like set -x for assignments.
float_precision: Option<usize>typeset -F N — fixed-point float precision (digits after the
decimal point). Default in zsh is 8 when -F is set without N.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VarAttr
impl RefUnwindSafe for VarAttr
impl Send for VarAttr
impl Sync for VarAttr
impl Unpin for VarAttr
impl UnsafeUnpin for VarAttr
impl UnwindSafe for VarAttr
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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>
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.