pub struct Thingy {
pub nam: String,
pub flags: i32,
pub rc: i32,
pub widget: Option<Arc<widget>>,
}Fields§
§nam: String§flags: i32§rc: i32§widget: Option<Arc<widget>>Implementations§
Source§impl Thingy
impl Thingy
Sourcepub fn new(name: &str) -> Thingy
pub fn new(name: &str) -> Thingy
Create a thingy with no widget bound — equivalent to a freshly
allocated entry from makethingynode() in
Src/Zle/zle_thingy.c:108. Callers fill in widget later via
bindwidget (zle_thingy.c:199).
Sourcepub fn builtin(name: &str) -> Thingy
pub fn builtin(name: &str) -> Thingy
Create a thingy that wraps a built-in widget.
Equivalent to the addzlefunction() path at
Src/Zle/zle_thingy.c:281: builds the immortal-flagged Thingy
and binds it to a Widget produced by the built-in dispatch
table (Widget::builtin).
Sourcepub fn user_defined(name: &str, func_name: &str) -> Thingy
pub fn user_defined(name: &str, func_name: &str) -> Thingy
Create a thingy that wraps a user-defined shell function.
Equivalent to bin_zle_new() at Src/Zle/zle_thingy.c:584 — the
zle -N name fn builtin path.
Sourcepub fn is(&self, name: &str) -> bool
pub fn is(&self, name: &str) -> bool
Test whether this thingy’s name matches name.
Equivalent to the IS_THINGY(thingy, name) macro at
Src/Zle/zle.h — used by widget bodies that special-case their
own bound name (e.g. select-a-word checking which alias fired).
Sourcepub fn is_thingy(&self, name: &str) -> bool
pub fn is_thingy(&self, name: &str) -> bool
Test whether this thingy is name or its dot-prefixed variant.
The .foo form names the underlying built-in when a user has
aliased foo to something else — see bin_zle_new’s args[0]
vs args[1] split at zle_thingy.c:584. Callers use this when
they want the canonical built-in regardless of user aliasing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Thingy
impl RefUnwindSafe for Thingy
impl Send for Thingy
impl Sync for Thingy
impl Unpin for Thingy
impl UnsafeUnpin for Thingy
impl UnwindSafe for Thingy
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.