pub enum KeySeg {
Literal(String),
Dynamic {
expr: String,
},
Template {
text: String,
},
}Expand description
One element of a parameter key.
Variants§
Literal(String)
A literal prefix from vb.pp("name") or a leaf tensor name.
Dynamic
A segment whose value is a runtime expression, e.g. the {index} in
vb.pp(format!("layers.{index}")).
The source text is kept verbatim; it is never evaluated. Concrete indices come only from matching a real checkpoint, never from a guess.
Template
A single dotted component containing both literal text and one or more runtime
placeholders, e.g. pre_local_block_{i}.
This is distinct from KeySeg::Dynamic so display preserves the literal portion
instead of adding another pair of braces around the whole component.
Trait Implementations§
impl Eq for KeySeg
impl StructuralPartialEq for KeySeg
Auto Trait Implementations§
impl Freeze for KeySeg
impl RefUnwindSafe for KeySeg
impl Send for KeySeg
impl Sync for KeySeg
impl Unpin for KeySeg
impl UnsafeUnpin for KeySeg
impl UnwindSafe for KeySeg
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
Mutably borrows from an owned value. Read more