pub struct FileOwners<Tree: Ast>(/* private fields */);Implementations§
Methods from Deref<Target = FrozenVec<Box<FileOwner<Tree>>>>§
sourcepub fn push_get(&self, val: T) -> &<T as Deref>::Target
pub fn push_get(&self, val: T) -> &<T as Deref>::Target
Push, immediately getting a reference to the element
sourcepub fn get(&self, index: usize) -> Option<&<T as Deref>::Target>
pub fn get(&self, index: usize) -> Option<&<T as Deref>::Target>
Returns a reference to an element.
sourcepub unsafe fn get_unchecked(&self, index: usize) -> &<T as Deref>::Target
pub unsafe fn get_unchecked(&self, index: usize) -> &<T as Deref>::Target
Returns a reference to an element, without doing bounds checking.
§Safety
index must be in bounds, i.e. it must be less than self.len()
sourcepub fn first(&self) -> Option<&<T as Deref>::Target>
pub fn first(&self) -> Option<&<T as Deref>::Target>
Returns the first element of the vector, or None if empty.
sourcepub fn last(&self) -> Option<&<T as Deref>::Target>
pub fn last(&self) -> Option<&<T as Deref>::Target>
Returns the last element of the vector, or None if empty.
sourcepub fn binary_search(&self, x: &<T as Deref>::Target) -> Result<usize, usize>
pub fn binary_search(&self, x: &<T as Deref>::Target) -> Result<usize, usize>
Binary searches this sorted vector for a given element, analogous to slice::binary_search.
sourcepub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
Binary searches this sorted vector with a comparator function, analogous to slice::binary_search_by.
sourcepub fn binary_search_by_key<'a, B, F>(
&'a self,
b: &B,
f: F,
) -> Result<usize, usize>
pub fn binary_search_by_key<'a, B, F>( &'a self, b: &B, f: F, ) -> Result<usize, usize>
Binary searches this sorted vector with a key extraction function, analogous to slice::binary_search_by_key.
sourcepub fn partition_point<P>(&self, pred: P) -> usize
pub fn partition_point<P>(&self, pred: P) -> usize
Returns the index of the partition point according to the given predicate (the index of the first element of the second partition), analogous to slice::partition_point.
Trait Implementations§
source§impl<Tree: Ast> Debug for FileOwners<Tree>
impl<Tree: Ast> Debug for FileOwners<Tree>
source§impl<Tree: Ast> Default for FileOwners<Tree>
impl<Tree: Ast> Default for FileOwners<Tree>
Auto Trait Implementations§
impl<Tree> !Freeze for FileOwners<Tree>
impl<Tree> !RefUnwindSafe for FileOwners<Tree>
impl<Tree> Send for FileOwners<Tree>where
Tree: Send,
impl<Tree> !Sync for FileOwners<Tree>
impl<Tree> Unpin for FileOwners<Tree>
impl<Tree> UnwindSafe for FileOwners<Tree>where
Tree: UnwindSafe,
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more