pub struct Selector { /* private fields */ }Expand description
Address of a value: [namespace, name, path...].
Implementations§
Source§impl Selector
impl Selector
Sourcepub fn new<I, S>(parts: I) -> Result<Self, InvalidSelector>
pub fn new<I, S>(parts: I) -> Result<Self, InvalidSelector>
Build from parts. Requires at least two non-empty parts.
Sourcepub fn parse(dotted: &str) -> Result<Self, InvalidSelector>
pub fn parse(dotted: &str) -> Result<Self, InvalidSelector>
Parse a dotted selector such as llm.text or start.user.name.
pub fn namespace(&self) -> &str
pub fn name(&self) -> &str
pub fn parts(&self) -> &[Arc<str>]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Selector
impl<'de> Deserialize<'de> for Selector
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Accepts ["node", "var"] or "node.var".
impl Eq for Selector
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Forget for Selector
impl Freeze for Selector
impl Move for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnsafeUnpin for Selector
impl UnwindSafe for Selector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.