pub struct Keys { /* private fields */ }
Implementations
sourceimpl Keys
impl Keys
pub fn new(keys: impl Iterator<Item = KeyOrIndex>) -> Self
pub fn single(key: impl Into<KeyOrIndex>) -> Self
pub fn join(&self, key: impl Into<KeyOrIndex>) -> Self
pub fn extend<I, K>(&self, keys: I) -> Selfwhere
I: IntoIterator<Item = K>,
K: Into<KeyOrIndex>,
pub fn first(&self) -> Option<&KeyOrIndex>
pub fn last(&self) -> Option<&KeyOrIndex>
pub fn last_property_key(&self) -> Option<&Key>
pub fn last_annotation_key(&self) -> Option<&Key>
pub fn last_text_range(&self) -> Option<TextRange>
pub fn iter(
&self
) -> impl ExactSizeIterator<Item = &KeyOrIndex> + DoubleEndedIterator
pub fn iter_keys(&self) -> Vec<Keys>
pub fn dotted(&self) -> &str
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn parent(&self) -> Option<Keys>
pub fn shift(&self) -> Option<(KeyOrIndex, Self)>
pub fn shift_annotation(&self) -> (Option<Key>, Self)
pub fn mapper_range(&self, node: &Node, mapper: &Mapper) -> Option<Range>
Trait Implementations
sourceimpl IntoIterator for Keys
impl IntoIterator for Keys
type Item = KeyOrIndex
type Item = KeyOrIndex
The type of the elements being iterated over.
type IntoIter = IntoIter<KeyOrIndex, Global>
type IntoIter = IntoIter<KeyOrIndex, Global>
Which kind of iterator are we turning this into?
sourceimpl PartialEq<Keys> for Keys
impl PartialEq<Keys> for Keys
impl Eq for Keys
Auto Trait Implementations
impl !RefUnwindSafe for Keys
impl !Send for Keys
impl !Sync for Keys
impl Unpin for Keys
impl !UnwindSafe for Keys
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.