pub struct TargetRef { /* private fields */ }Expand description
A parsed target_ref: <scheme>:<opaque>. The scheme is the target-kind
discriminator (proposal §7.1).
Implementations§
Source§impl TargetRef
impl TargetRef
Sourcepub fn parse(s: &str) -> Result<Self>
pub fn parse(s: &str) -> Result<Self>
Parse <scheme>:<opaque>. Fails if there is no scheme or empty opaque.
pub fn scheme(&self) -> &str
pub fn opaque(&self) -> &str
Sourcepub fn auto_apply_eligible_class(&self) -> bool
pub fn auto_apply_eligible_class(&self) -> bool
Memory/query targets are the only classes eligible for auto-apply
(§6.3); prompt (doc:), host:, the §7.4 tool:/evalset: classes,
and the tuning seam’s model: class are never auto-applied — code,
adapters, and their gate are excluded BY NAME, not by accident of the
grant vocabulary.
Sourcepub fn target_class(&self) -> &'static str
pub fn target_class(&self) -> &'static str
The policy target class: memory (grain/entity), query
(query/template), prompt (doc), code (tool), evalset, or host.
pub fn as_string(&self) -> String
Trait Implementations§
impl Eq for TargetRef
impl StructuralPartialEq for TargetRef
Auto Trait Implementations§
impl Freeze for TargetRef
impl RefUnwindSafe for TargetRef
impl Send for TargetRef
impl Sync for TargetRef
impl Unpin for TargetRef
impl UnsafeUnpin for TargetRef
impl UnwindSafe for TargetRef
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