pub enum nameref_resolution {
NotRef,
Placeholder(String),
Target {
name: String,
subscript: Option<String>,
pm: Option<Param>,
level: i32,
},
SelfRef,
OutOfScope,
}Expand description
Result of walking a nameref chain by name. Rust-side carrier for
what C’s resolve_nameref_rec (Src/params.c:6332) communicates
via the returned Param pointer: the chain may end at the final
non-ref target, at a placeholder ref (empty refname), at a
subscripted ref (pm->width ends the chain per c:6339), at a
dangling name (target never defined), or in a loop.
Variants§
NotRef
name is not a nameref (or doesn’t exist / is an unset ref).
Placeholder(String)
Chain ends at a nameref whose refname is empty/None —
the C keep_lastref shape (c:6354). Field = that ref’s name.
Target
Final non-ref target. pm is a clone of the resolved binding
(None when the target name was never defined — C returns NULL
at c:6347 when gethashnode2 misses). level is the resolved
binding’s scope level (for old-chain writes).
Fields
SelfRef
Loop detected — zerr("...: invalid self reference") already
emitted (c:6341-6343).
OutOfScope
The refname EXISTS in the table but the upscope walk excluded
every binding (c:6347-6349: loadparamnode(upscope(...))
returned NULL with gethashnode2 non-NULL, so the keep_lastref
else-arm is SKIPPED). Reads see unset; assignment FAILS
(createparam c:1108-1118 refuses the existing ref).
Auto Trait Implementations§
impl Freeze for nameref_resolution
impl RefUnwindSafe for nameref_resolution
impl Send for nameref_resolution
impl Sync for nameref_resolution
impl Unpin for nameref_resolution
impl UnsafeUnpin for nameref_resolution
impl UnwindSafe for nameref_resolution
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more