[−][src]Enum object_query::Query
Either a key or an index query
Variants
The index query. Represents the index (starting at 0) from either the front or the back
The key query. Represents string key to query by
Implementations
impl Query<'static>
[src]
pub fn index(index: usize) -> Self
[src]
Create an index query from the front
pub fn index_from_last(index: usize) -> Self
[src]
Create an index query from the back
pub fn key_owned(key: String) -> Self
[src]
Create a owned key query
impl<'a> Query<'a>
[src]
pub fn key(key: &'a str) -> Self
[src]
Create a borrowed key query
pub fn is_from_last(&self) -> bool
[src]
Is an index query from the back
pub fn is_key(&self) -> bool
[src]
Is a key query
pub fn is_index(&self) -> bool
[src]
Is an index query
pub fn as_key(&self) -> Option<&str>
[src]
Return the string reference if it is a key query
pub fn as_index(&self) -> Option<i64>
[src]
Returns an i64 representation of the index if it is a index query. This is either the index
or 0 - index - 1
for an index from the back
pub fn to_owned(&self) -> Query<'static>
[src]
An alternative to the std::borrow::ToOwned
method
Trait Implementations
impl<'a> Clone for Query<'a>
[src]
impl<'a> Debug for Query<'a>
[src]
impl<'a> Eq for Query<'a>
[src]
impl<'a> From<&'a str> for Query<'a>
[src]
impl From<String> for Query<'static>
[src]
impl From<i16> for Query<'static>
[src]
impl From<i32> for Query<'static>
[src]
impl From<i64> for Query<'static>
[src]
impl From<i8> for Query<'static>
[src]
impl From<isize> for Query<'static>
[src]
impl From<u16> for Query<'static>
[src]
impl From<u32> for Query<'static>
[src]
impl From<u64> for Query<'static>
[src]
impl From<u8> for Query<'static>
[src]
impl From<usize> for Query<'static>
[src]
impl<'a> PartialEq<Query<'a>> for Query<'a>
[src]
impl<'a> StructuralEq for Query<'a>
[src]
impl<'a> StructuralPartialEq for Query<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Query<'a>
impl<'a> Send for Query<'a>
impl<'a> Sync for Query<'a>
impl<'a> Unpin for Query<'a>
impl<'a> UnwindSafe for Query<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,