pub trait VecResource<T> {
// Required methods
fn rhwp_push(&mut self, value: T) -> Result<(), ResourceError>;
fn rhwp_reserve(&mut self, additional: usize) -> Result<(), ResourceError>;
fn rhwp_resize(
&mut self,
count: usize,
value: T,
) -> Result<(), ResourceError>
where T: Clone;
fn rhwp_extend(
&mut self,
iter: impl IntoIterator<Item = T>,
) -> Result<(), ResourceError>;
fn rhwp_extend_from_slice(
&mut self,
source: &[T],
) -> Result<(), ResourceError>
where T: Copy;
fn rhwp_append(&mut self, other: &mut Vec<T>) -> Result<(), ResourceError>;
}Expand description
Fallible methods preserve normal Vec reborrowing at decoder call sites.
Required Methods§
fn rhwp_push(&mut self, value: T) -> Result<(), ResourceError>
fn rhwp_reserve(&mut self, additional: usize) -> Result<(), ResourceError>
fn rhwp_resize(&mut self, count: usize, value: T) -> Result<(), ResourceError>where
T: Clone,
fn rhwp_extend( &mut self, iter: impl IntoIterator<Item = T>, ) -> Result<(), ResourceError>
fn rhwp_extend_from_slice(&mut self, source: &[T]) -> Result<(), ResourceError>where
T: Copy,
fn rhwp_append(&mut self, other: &mut Vec<T>) -> Result<(), ResourceError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".