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