pub struct Slice {
pub start: Option<Integer>,
pub end: Option<Integer>,
pub step: Option<Integer>,
}Expand description
A slice selector
Fields§
§start: Option<Integer>The start of the slice
This can be negative to start the slice from a position relative to the end of the array being sliced.
end: Option<Integer>The end of the slice
This can be negative to end the slice at a position relative to the end of the array being sliced.
step: Option<Integer>The step slice for the slice
This can be negative to step in reverse order.
Trait Implementations§
Source§impl Queryable for Slice
impl Queryable for Slice
Source§fn query<'b>(&self, current: &'b Value, _root: &'b Value) -> Vec<&'b Value>
fn query<'b>(&self, current: &'b Value, _root: &'b Value) -> Vec<&'b Value>
Query
self using a current node, and the root nodeSource§fn query_located<'b>(
&self,
current: &'b Value,
_root: &'b Value,
parent: NormalizedPath<'b>,
) -> Vec<LocatedNode<'b>>
fn query_located<'b>( &self, current: &'b Value, _root: &'b Value, parent: NormalizedPath<'b>, ) -> Vec<LocatedNode<'b>>
Query
self using a current node, the root node, and the normalized path of the current
node’s parentimpl Copy for Slice
impl Eq for Slice
impl StructuralPartialEq for Slice
Auto Trait Implementations§
impl Freeze for Slice
impl RefUnwindSafe for Slice
impl Send for Slice
impl Sync for Slice
impl Unpin for Slice
impl UnwindSafe for Slice
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