pub struct MemOptions {
pub initial_data: Option<Vec<u8>>,
pub capacity: usize,
}Expand description
Options for creating a MemResource.
Fields§
§initial_data: Option<Vec<u8>>Pre-fill the resource with this data (committed on creation).
capacity: usizeInitial capacity hint in bytes. The buffer starts with this capacity but grows as needed on writes. Defaults to 0 (start empty, grow on demand).
Trait Implementations§
Source§impl Clone for MemOptions
impl Clone for MemOptions
Source§fn clone(&self) -> MemOptions
fn clone(&self) -> MemOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemOptions
impl Debug for MemOptions
Source§impl Default for MemOptions
impl Default for MemOptions
Source§fn default() -> MemOptions
fn default() -> MemOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemOptions
impl RefUnwindSafe for MemOptions
impl Send for MemOptions
impl Sync for MemOptions
impl Unpin for MemOptions
impl UnsafeUnpin for MemOptions
impl UnwindSafe for MemOptions
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
Mutably borrows from an owned value. Read more