[−][src]Struct bvh_anim::JointName
Wrapper struct for the Joint
name type.
Methods from Deref<Target = SmallVec<[u8; 24]>>
pub unsafe fn set_len(&mut self, new_len: usize)
[src]
Sets the length of a vector.
This will explicitly set the size of the vector, without actually modifying its buffers, so it is up to the caller to ensure that the vector is actually the specified size.
pub fn inline_size(&self) -> usize
[src]
The maximum number of elements this vector can hold inline
pub fn len(&self) -> usize
[src]
The number of elements stored in the vector
pub fn is_empty(&self) -> bool
[src]
Returns true
if the vector is empty
pub fn capacity(&self) -> usize
[src]
The number of items the vector can hold without reallocating
pub fn spilled(&self) -> bool
[src]
Returns true
if the data has spilled into a separate heap-allocated buffer.
pub fn drain(&mut self) -> Drain<<A as Array>::Item>
[src]
Empty the vector and return an iterator over its former contents.
pub fn push(&mut self, value: <A as Array>::Item)
[src]
Append an item to the vector.
pub fn pop(&mut self) -> Option<<A as Array>::Item>
[src]
Remove an item from the end of the vector and return it, or None if empty.
pub fn grow(&mut self, new_cap: usize)
[src]
Re-allocate to set the capacity to max(new_cap, inline_size())
.
Panics if new_cap
is less than the vector's length.
pub fn reserve(&mut self, additional: usize)
[src]
Reserve capacity for additional
more elements to be inserted.
May reserve more space to avoid frequent reallocations.
If the new capacity would overflow usize
then it will be set to usize::max_value()
instead. (This means that inserting additional
new elements is not guaranteed to be
possible after calling this function.)
pub fn reserve_exact(&mut self, additional: usize)
[src]
Reserve the minimum capacity for additional
more elements to be inserted.
Panics if the new capacity overflows usize
.
pub fn shrink_to_fit(&mut self)
[src]
Shrink the capacity of the vector as much as possible.
When possible, this will move data from an external heap buffer to the vector's inline storage.
pub fn truncate(&mut self, len: usize)
[src]
Shorten the vector, keeping the first len
elements and dropping the rest.
If len
is greater than or equal to the vector's current length, this has no
effect.
This does not re-allocate. If you want the vector's capacity to shrink, call
shrink_to_fit
after truncating.
pub fn as_slice(&self) -> &[<A as Array>::Item]
[src]
Extracts a slice containing the entire vector.
Equivalent to &s[..]
.
pub fn as_mut_slice(&mut self) -> &mut [<A as Array>::Item]
[src]
Extracts a mutable slice of the entire vector.
Equivalent to &mut s[..]
.
pub fn swap_remove(&mut self, index: usize) -> <A as Array>::Item
[src]
Remove the element at position index
, replacing it with the last element.
This does not preserve ordering, but is O(1).
Panics if index
is out of bounds.
pub fn clear(&mut self)
[src]
Remove all elements from the vector.
pub fn remove(&mut self, index: usize) -> <A as Array>::Item
[src]
Remove and return the element at position index
, shifting all elements after it to the
left.
Panics if index
is out of bounds.
pub fn insert(&mut self, index: usize, element: <A as Array>::Item)
[src]
Insert an element at position index
, shifting all elements after it to the right.
Panics if index
is out of bounds.
pub fn insert_many<I>(&mut self, index: usize, iterable: I) where
I: IntoIterator<Item = <A as Array>::Item>,
[src]
I: IntoIterator<Item = <A as Array>::Item>,
Insert multiple elements at position index
, shifting all following elements toward the
back.
pub fn retain<F>(&mut self, f: F) where
F: FnMut(&mut <A as Array>::Item) -> bool,
[src]
F: FnMut(&mut <A as Array>::Item) -> bool,
Retains only the elements specified by the predicate.
In other words, remove all elements e
such that f(&e)
returns false
.
This method operates in place and preserves the order of the retained
elements.
pub fn dedup(&mut self) where
<A as Array>::Item: PartialEq<<A as Array>::Item>,
[src]
<A as Array>::Item: PartialEq<<A as Array>::Item>,
Removes consecutive duplicate elements.
pub fn dedup_by<F>(&mut self, same_bucket: F) where
F: FnMut(&mut <A as Array>::Item, &mut <A as Array>::Item) -> bool,
[src]
F: FnMut(&mut <A as Array>::Item, &mut <A as Array>::Item) -> bool,
Removes consecutive duplicate elements using the given equality relation.
pub fn dedup_by_key<F, K>(&mut self, key: F) where
F: FnMut(&mut <A as Array>::Item) -> K,
K: PartialEq<K>,
[src]
F: FnMut(&mut <A as Array>::Item) -> K,
K: PartialEq<K>,
Removes consecutive elements that map to the same key.
pub fn insert_from_slice(&mut self, index: usize, slice: &[<A as Array>::Item])
[src]
Copy elements from a slice into the vector at position index
, shifting any following
elements toward the back.
For slices of Copy
types, this is more efficient than insert
.
pub fn extend_from_slice(&mut self, slice: &[<A as Array>::Item])
[src]
Copy elements from a slice and append them to the vector.
For slices of Copy
types, this is more efficient than extend
.
pub fn resize(&mut self, len: usize, value: <A as Array>::Item)
[src]
Resizes the vector so that its length is equal to len
.
If len
is less than the current length, the vector simply truncated.
If len
is greater than the current length, value
is appended to the
vector until its length equals len
.
Trait Implementations
impl AsMut<BStr> for JointName
[src]
impl AsMut<[u8]> for JointName
[src]
impl<B: AsRef<[u8]>> PartialEq<B> for JointName
[src]
fn eq(&self, rhs: &B) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl AsRef<BStr> for JointName
[src]
impl AsRef<[u8]> for JointName
[src]
impl Default for JointName
[src]
impl Clone for JointName
[src]
fn clone(&self) -> JointName
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for JointName
[src]
fn cmp(&self, other: &JointName) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl From<CString> for JointName
[src]
impl<'_> From<&'_ CStr> for JointName
[src]
impl From<Vec<u8>> for JointName
[src]
impl<'_> From<&'_ [u8]> for JointName
[src]
impl From<String> for JointName
[src]
impl<'_> From<&'_ str> for JointName
[src]
impl From<BString> for JointName
[src]
impl<'_> From<&'_ BStr> for JointName
[src]
impl From<SmallVec<[u8; 24]>> for JointName
[src]
impl From<JointName> for SmallVec<[u8; 24]>
[src]
impl Eq for JointName
[src]
impl<B: AsRef<[u8]>> PartialOrd<B> for JointName
[src]
fn partial_cmp(&self, rhs: &B) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl DerefMut for JointName
[src]
impl Deref for JointName
[src]
type Target = SmallVec<[u8; 24]>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl Display for JointName
[src]
impl Debug for JointName
[src]
impl Hash for JointName
[src]
Auto Trait Implementations
Blanket Implementations
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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 for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,