pub struct XmlNodeChildVec {
pub run_destructor: bool,
/* private fields */
}Fields§
§run_destructor: boolWhether to run the destructor on drop (prevents double-free when cloned to C)
Implementations§
Source§impl XmlNodeChildVec
impl XmlNodeChildVec
pub fn new() -> XmlNodeChildVec
pub fn with_capacity(cap: usize) -> XmlNodeChildVec
pub const fn from_const_slice(input: &'static [XmlNodeChild]) -> XmlNodeChildVec
pub fn from_vec(input: Vec<XmlNodeChild>) -> XmlNodeChildVec
pub fn iter(&self) -> Iter<'_, XmlNodeChild>
pub fn ptr_as_usize(&self) -> usize
pub const fn len(&self) -> usize
pub const fn capacity(&self) -> usize
pub const fn is_empty(&self) -> bool
Sourcepub fn get(&self, index: usize) -> Option<&XmlNodeChild>
pub fn get(&self, index: usize) -> Option<&XmlNodeChild>
Returns a reference to the element at the given index (Rust-only, inline).
Sourcepub fn c_get(&self, index: usize) -> OptionXmlNodeChildwhere
XmlNodeChild: Clone,
pub fn c_get(&self, index: usize) -> OptionXmlNodeChildwhere
XmlNodeChild: Clone,
C-API compatible get function. Returns a copy of the element at the given index. Returns None if the index is out of bounds.
Sourcepub fn as_slice(&self) -> &[XmlNodeChild]
pub fn as_slice(&self) -> &[XmlNodeChild]
Returns the vec as a Rust slice (Rust-only, not C-API compatible).
Sourcepub fn as_c_slice(&self) -> XmlNodeChildVecSlice
pub fn as_c_slice(&self) -> XmlNodeChildVecSlice
Returns a C-compatible slice of the entire Vec.
Sourcepub fn as_c_slice_range(&self, start: usize, end: usize) -> XmlNodeChildVecSlice
pub fn as_c_slice_range(&self, start: usize, end: usize) -> XmlNodeChildVecSlice
Returns a C-compatible slice of a range within the Vec. If the range is out of bounds, it is clamped to the valid range.
Sourcepub fn as_ptr(&self) -> *const XmlNodeChild
pub fn as_ptr(&self) -> *const XmlNodeChild
Returns a pointer to the Vec’s data.
Use len() to get the number of elements.
Source§impl XmlNodeChildVec
impl XmlNodeChildVec
pub fn as_mut_slice_extended<'a>(&mut self) -> &'a mut [XmlNodeChild]
pub fn as_mut_ptr(&mut self) -> *mut XmlNodeChild
pub fn sort_by<F>(&mut self, compare: F)
pub fn push(&mut self, value: XmlNodeChild)
pub fn insert(&mut self, index: usize, element: XmlNodeChild)
pub fn remove(&mut self, index: usize)
pub fn pop(&mut self) -> Option<XmlNodeChild>
pub fn iter_mut(&mut self) -> IterMut<'_, XmlNodeChild>
pub fn into_iter(self) -> IntoIter<XmlNodeChild>
pub fn append(&mut self, other: &mut XmlNodeChildVec)
pub fn reserve(&mut self, additional: usize)
pub fn truncate(&mut self, len: usize)
pub fn retain<F>(&mut self, f: F)
Source§impl XmlNodeChildVec
impl XmlNodeChildVec
pub fn from_copy_on_write( input: Cow<'static, [XmlNodeChild]>, ) -> XmlNodeChildVec
Sourcepub fn from_item(item: XmlNodeChild) -> XmlNodeChildVec
pub fn from_item(item: XmlNodeChild) -> XmlNodeChildVec
Creates a Vec containing a single element
Sourcepub unsafe fn copy_from_ptr(
ptr: *const XmlNodeChild,
len: usize,
) -> XmlNodeChildVec
pub unsafe fn copy_from_ptr( ptr: *const XmlNodeChild, len: usize, ) -> XmlNodeChildVec
Copies elements from a C array pointer into a new Vec.
§Safety
ptrmust be valid for readinglenelements- The memory must be properly aligned for
$struct_type - The elements are cloned, so
$struct_typemust implementClone
Sourcepub fn clone_self(&self) -> XmlNodeChildVec
pub fn clone_self(&self) -> XmlNodeChildVec
NOTE: CLONES the memory if the memory is external or &’static Moves the memory out if the memory is library-allocated
Sourcepub fn into_library_owned_vec(self) -> Vec<XmlNodeChild>
pub fn into_library_owned_vec(self) -> Vec<XmlNodeChild>
NOTE: CLONES the memory if the memory is external or &’static Moves the memory out if the memory is library-allocated
Trait Implementations§
Source§impl AsMut<[XmlNodeChild]> for XmlNodeChildVec
impl AsMut<[XmlNodeChild]> for XmlNodeChildVec
Source§fn as_mut(&mut self) -> &mut [XmlNodeChild]
fn as_mut(&mut self) -> &mut [XmlNodeChild]
Source§impl AsRef<[XmlNodeChild]> for XmlNodeChildVec
impl AsRef<[XmlNodeChild]> for XmlNodeChildVec
Source§fn as_ref(&self) -> &[XmlNodeChild]
fn as_ref(&self) -> &[XmlNodeChild]
Source§impl Clone for XmlNodeChildVec
impl Clone for XmlNodeChildVec
Source§fn clone(&self) -> XmlNodeChildVec
fn clone(&self) -> XmlNodeChildVec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for XmlNodeChildVec
impl Debug for XmlNodeChildVec
Source§impl Default for XmlNodeChildVec
impl Default for XmlNodeChildVec
Source§fn default() -> XmlNodeChildVec
fn default() -> XmlNodeChildVec
Source§impl Drop for XmlNodeChildVec
impl Drop for XmlNodeChildVec
Source§impl Extend<XmlNodeChild> for XmlNodeChildVec
impl Extend<XmlNodeChild> for XmlNodeChildVec
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = XmlNodeChild>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = XmlNodeChild>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl From<&'static [XmlNodeChild]> for XmlNodeChildVec
impl From<&'static [XmlNodeChild]> for XmlNodeChildVec
Source§fn from(input: &'static [XmlNodeChild]) -> XmlNodeChildVec
fn from(input: &'static [XmlNodeChild]) -> XmlNodeChildVec
Source§impl From<Vec<XmlNodeChild>> for XmlNodeChildVec
impl From<Vec<XmlNodeChild>> for XmlNodeChildVec
Source§fn from(input: Vec<XmlNodeChild>) -> XmlNodeChildVec
fn from(input: Vec<XmlNodeChild>) -> XmlNodeChildVec
Source§impl From<XmlNodeChildVec> for Vec<XmlNodeChild>
impl From<XmlNodeChildVec> for Vec<XmlNodeChild>
Source§fn from(input: XmlNodeChildVec) -> Vec<XmlNodeChild>
fn from(input: XmlNodeChildVec) -> Vec<XmlNodeChild>
Source§impl FromIterator<XmlNodeChild> for XmlNodeChildVec
impl FromIterator<XmlNodeChild> for XmlNodeChildVec
Source§fn from_iter<T>(iter: T) -> XmlNodeChildVecwhere
T: IntoIterator<Item = XmlNodeChild>,
fn from_iter<T>(iter: T) -> XmlNodeChildVecwhere
T: IntoIterator<Item = XmlNodeChild>,
Source§impl Hash for XmlNodeChildVec
impl Hash for XmlNodeChildVec
Source§impl Ord for XmlNodeChildVec
impl Ord for XmlNodeChildVec
Source§fn cmp(&self, rhs: &XmlNodeChildVec) -> Ordering
fn cmp(&self, rhs: &XmlNodeChildVec) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for XmlNodeChildVec
impl PartialEq for XmlNodeChildVec
Source§impl PartialOrd for XmlNodeChildVec
impl PartialOrd for XmlNodeChildVec
impl Eq for XmlNodeChildVec
impl Send for XmlNodeChildVec
impl Sync for XmlNodeChildVec
Auto Trait Implementations§
impl Freeze for XmlNodeChildVec
impl RefUnwindSafe for XmlNodeChildVec
impl Unpin for XmlNodeChildVec
impl UnsafeUnpin for XmlNodeChildVec
impl UnwindSafe for XmlNodeChildVec
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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