Struct async_graphql::dynamic::ListAccessor
source · pub struct ListAccessor<'a>(_);
Available on crate feature
dynamic-schema
only.Expand description
A list accessor
Implementations
sourceimpl<'a> ListAccessor<'a>
impl<'a> ListAccessor<'a>
sourcepub fn iter(&'a self) -> impl Iterator<Item = ValueAccessor<'_>> + 'a
pub fn iter(&'a self) -> impl Iterator<Item = ValueAccessor<'_>> + 'a
Returns an iterator over the list
sourcepub fn get(&self, idx: usize) -> Option<ValueAccessor<'a>>
pub fn get(&self, idx: usize) -> Option<ValueAccessor<'a>>
Returns a reference to an element depending on the index
sourcepub fn try_get(&self, idx: usize) -> Result<ValueAccessor<'a>>
pub fn try_get(&self, idx: usize) -> Result<ValueAccessor<'a>>
Like ListAccessor::get
, returns Err
if the index does not exist
Auto Trait Implementations
impl<'a> RefUnwindSafe for ListAccessor<'a>
impl<'a> Send for ListAccessor<'a>
impl<'a> Sync for ListAccessor<'a>
impl<'a> Unpin for ListAccessor<'a>
impl<'a> UnwindSafe for ListAccessor<'a>
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