pub struct Handle<'a, T: ?Sized> { /* private fields */ }Expand description
An owned, mutable pointer to some memory backed by an Arena, analogous to
Box<T>.
See the module documentation for more information.
Implementations§
Source§impl<'a, T> Handle<'a, T>
impl<'a, T> Handle<'a, T>
Sourcepub fn new_in<A: Allocator>(arena: &'a Arena<A>, value: T) -> Self
pub fn new_in<A: Allocator>(arena: &'a Arena<A>, value: T) -> Self
Create a new Handle containing the given value.
§Example
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_in(&arena, 156);Sourcepub fn new_with<A: Allocator, F: FnOnce() -> T>(
arena: &'a Arena<A>,
f: F,
) -> Self
pub fn new_with<A: Allocator, F: FnOnce() -> T>( arena: &'a Arena<A>, f: F, ) -> Self
Create a new Handle containing the return value of the given function.
§Example
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_with(&arena, || 23 + 45);Sourcepub unsafe fn init_with<A: Allocator, F: FnOnce(&mut MaybeUninit<T>)>(
arena: &'a Arena<A>,
f: F,
) -> Self
pub unsafe fn init_with<A: Allocator, F: FnOnce(&mut MaybeUninit<T>)>( arena: &'a Arena<A>, f: F, ) -> Self
Create a new Handle, using the given function to initialize its contents.
§Safety
The function must fully initialize the allocated value, as this function will
assume that the value has been fully initialized when the given f is run.
If this contract is not held, then this Handle may permit access to uninitialized
data.
§Examples
use core::ptr::{self, addr_of_mut};
use rotunda::{Arena, handle::Handle};
struct Data {
integer: u32,
string: &'static str,
}
let arena = Arena::new();
let handle: Handle<'_, Data> = unsafe {
Handle::init_with(&arena, |data| unsafe {
let data_ptr: *mut Data = data.as_mut_ptr();
ptr::write(addr_of_mut!((*data_ptr).integer), 25);
ptr::write(addr_of_mut!((*data_ptr).string), "Default Data");
})
};
assert_eq!(handle.integer, 25);
assert_eq!(handle.string, "Default Data");Sourcepub const fn into_slice(this: Self) -> Handle<'a, [T]> ⓘ
pub const fn into_slice(this: Self) -> Handle<'a, [T]> ⓘ
Converts the handle into a Handle<[T]> with a slice length of 1.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_in(&arena, 'c');
let slice_handle = Handle::into_slice(handle);
assert_eq!(&*slice_handle, &['c']);Sourcepub const fn into_array(this: Self) -> Handle<'a, [T; 1]> ⓘ
pub const fn into_array(this: Self) -> Handle<'a, [T; 1]> ⓘ
Converts the handle into a Handle<[T; 1]>.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_in(&arena, 266);
let array_handle = Handle::into_array(handle);
assert_eq!(array_handle, [266; 1]);Source§impl<'a, T> Handle<'a, [T; 1]>
impl<'a, T> Handle<'a, [T; 1]>
Sourcepub const fn from_array(this: Self) -> Handle<'a, T> ⓘ
pub const fn from_array(this: Self) -> Handle<'a, T> ⓘ
Create a Handle<T> from a handle to an array containing a single element.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let array_handle = Handle::new_in(&arena, [25; 1]);
let handle = Handle::from_array(array_handle);
assert_eq!(handle, 25);Source§impl<'a, T: Default> Handle<'a, T>
impl<'a, T: Default> Handle<'a, T>
Sourcepub fn new_default_in<A: Allocator>(arena: &'a Arena<A>) -> Self
pub fn new_default_in<A: Allocator>(arena: &'a Arena<A>) -> Self
Create a new Handle in arena, containing the default value of T.
§Example
let arena = Arena::new();
let handle = Handle::<Vec<i32>>::new_default_in(&arena);
assert_eq!(&*handle, &<Vec<i32>>::default());Source§impl<'a, T> Handle<'a, MaybeUninit<T>>
impl<'a, T> Handle<'a, MaybeUninit<T>>
Sourcepub fn new_uninit_in<A: Allocator>(arena: &'a Arena<A>) -> Self
pub fn new_uninit_in<A: Allocator>(arena: &'a Arena<A>) -> Self
Create a new Handle in arena, containing an uninitialized MaybeUninit<T>.
§Examples
let arena = Arena::new();
let handle: Handle<MaybeUninit<i32>> = Handle::new_uninit_in(&arena);Sourcepub fn new_uninit_zeroed_in<A: Allocator>(arena: &'a Arena<A>) -> Self
pub fn new_uninit_zeroed_in<A: Allocator>(arena: &'a Arena<A>) -> Self
Create a new Handle in arena, containing a zeroed MaybeUninit<T>.
§Examples
let arena = Arena::new();
let handle: Handle<MaybeUninit<i32>> = Handle::new_uninit_zeroed_in(&arena);Source§impl<'a, T, const N: usize> Handle<'a, [MaybeUninit<T>; N]>
impl<'a, T, const N: usize> Handle<'a, [MaybeUninit<T>; N]>
pub fn new_array_uninit_in<A: Allocator>(arena: &'a Arena<A>) -> Self
pub fn new_array_uninit_zeroed_in<A: Allocator>(arena: &'a Arena<A>) -> Self
Source§impl<'a, T> Handle<'a, [MaybeUninit<T>]>
impl<'a, T> Handle<'a, [MaybeUninit<T>]>
pub fn new_slice_uninit_in<A: Allocator>( arena: &'a Arena<A>, slice_len: usize, ) -> Self
Source§impl<'a, T, const N: usize> Handle<'a, MaybeUninit<[T; N]>>
impl<'a, T, const N: usize> Handle<'a, MaybeUninit<[T; N]>>
pub fn transpose_inner_uninit(self) -> Handle<'a, [MaybeUninit<T>; N]> ⓘ
Source§impl<'a, T, const N: usize> Handle<'a, [MaybeUninit<T>; N]>
impl<'a, T, const N: usize> Handle<'a, [MaybeUninit<T>; N]>
pub fn transpose_outer_uninit(self) -> Handle<'a, MaybeUninit<[T; N]>> ⓘ
pub const unsafe fn assume_init_array(self) -> Handle<'a, [T; N]> ⓘ
Source§impl<'a, T: ?Sized> Handle<'a, T>
impl<'a, T: ?Sized> Handle<'a, T>
Sourcepub const fn into_raw(this: Self) -> *mut T
pub const fn into_raw(this: Self) -> *mut T
Converts the Handle into a raw pointer.
§Notes
Ownership of the resource managed by the Handle is transferred to
the caller. It is their responsibility to ensure that the contents
of the pointer are dropped when necessary.
Handle has no drop logic - it is valid to use either Handle::from_raw
or core::ptr::drop_in_place to clean up the resource.
The pointer returned by Handle should not be accessed if the memory backing
it in the Arena is dellocated.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_in(&arena, 42);
let ptr = Handle::into_raw(handle);Sourcepub const unsafe fn from_raw(raw: *mut T) -> Self
pub const unsafe fn from_raw(raw: *mut T) -> Self
Take ownership of the given raw pointer.
§Safety
It is the caller’s responsibiity to ensure that raw has been created from
a previous call to Handle::into_raw, and that the Arena backing it’s
allocation has not cleared the block in use by the allocation.
If this precondition is not held, then the Handle may point to dangling
memory.
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_in(&arena, 42u8);
let raw = Handle::into_raw(handle);
unsafe {
*&mut (*raw) = 255;
}
let handle = unsafe { Handle::from_raw(raw) };
assert_eq!(handle, 255);Sourcepub const fn as_ptr(this: &Self) -> *const T
pub const fn as_ptr(this: &Self) -> *const T
Access the contained value through a const pointer.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_in(&arena, 42);
let ptr = Handle::as_ptr(&handle);Sourcepub const fn as_mut_ptr(this: &mut Self) -> *mut T
pub const fn as_mut_ptr(this: &mut Self) -> *mut T
Access the contained value through a mutable pointer.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let mut handle = Handle::new_in(&arena, 42);
let ptr = Handle::as_mut_ptr(&mut handle);Source§impl<'a, T: Unpin> Handle<'a, T>
impl<'a, T: Unpin> Handle<'a, T>
Sourcepub const fn into_inner(this: Self) -> T
pub const fn into_inner(this: Self) -> T
Returns the inner value of the Handle.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_in(&arena, vec![1, 2, 3, 4]);
let data = Handle::into_inner(handle);
assert_eq!(&data, &[1, 2, 3, 4]);Sourcepub const fn extract_inner(this: Self) -> (T, Handle<'a, MaybeUninit<T>>)
pub const fn extract_inner(this: Self) -> (T, Handle<'a, MaybeUninit<T>>)
Extracts the inner value of the Handle, returning the value and the empty Handle.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let mut handle = Handle::new_in(&arena, 1024);
let (data, empty_handle) = Handle::extract_inner(handle);
assert_eq!(data, 1024);
let new_handle = Handle::init(empty_handle, 2048);Sourcepub const fn replace(this: &mut Self, value: T) -> T
pub const fn replace(this: &mut Self, value: T) -> T
Replace the contents of this Handle with the given value.
The previous contents of the Handle are returned.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let mut handle = Handle::new_in(&arena, 25);
let prev = Handle::replace(&mut handle, 42);
assert_eq!(*handle, 42);
assert_eq!(prev, 25);Source§impl<'a, T> Handle<'a, [T]>
impl<'a, T> Handle<'a, [T]>
pub const unsafe fn slice_from_raw_parts(data: *mut T, len: usize) -> Self
Sourcepub fn new_slice_with_fn_in<A: Allocator, F: FnMut(usize) -> T>(
arena: &'a Arena<A>,
slice_len: usize,
f: F,
) -> Self
pub fn new_slice_with_fn_in<A: Allocator, F: FnMut(usize) -> T>( arena: &'a Arena<A>, slice_len: usize, f: F, ) -> Self
Create a Handle slice of length slice_len, where each element is initialized by f.
The function f is called with the index of each item in the Handle.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_slice_with_fn_in(&arena, 5, |i| i * 2);
assert_eq!(handle.as_ref(), &[0, 2, 4, 6, 8]);Sourcepub fn new_slice_from_iter_in<A: Allocator, I: IntoIterator<Item = T>>(
arena: &'a Arena<A>,
iter: I,
) -> Selfwhere
I::IntoIter: ExactSizeIterator,
pub fn new_slice_from_iter_in<A: Allocator, I: IntoIterator<Item = T>>(
arena: &'a Arena<A>,
iter: I,
) -> Selfwhere
I::IntoIter: ExactSizeIterator,
Create a Handle slice containing the contents of the given iterator.
§Panics
If there is not enough room in the current Block to move all items from
the iter into the Handle, this method will panic.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_slice_from_iter_in(
&arena,
[0, 1, 2, 3, 4]);
assert_eq!(handle.as_ref(), &[0, 1, 2, 3, 4]);Sourcepub const fn empty() -> Self
pub const fn empty() -> Self
Create an empty Handle.
The returned handle is not backed by any memory.
§Examples
use rotunda::handle::Handle;
let handle = Handle::<[i32]>::empty();
assert_eq!(handle.as_ref(), &[]);Sourcepub const fn into_buffer(this: Self) -> Buffer<'a, T>
pub const fn into_buffer(this: Self) -> Buffer<'a, T>
Create a Buffer from this Handle.
See Buffer::from_slice_handle for more details.
pub fn split_off(this: &mut Self, at: usize) -> Handle<'a, [T]> ⓘ
Sourcepub const fn split_at(
this: Self,
mid: usize,
) -> (Handle<'a, [T]>, Handle<'a, [T]>)
pub const fn split_at( this: Self, mid: usize, ) -> (Handle<'a, [T]>, Handle<'a, [T]>)
Split the Handle at the given mid, returning the left and right
sides of the array.
§Panics
This method will panic if mid is greater than or equal to self.len().
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_slice_from_iter_in(&arena, [1, 2, 3, 4, 5, 6]);
let (lhs, rhs) = Handle::split_at(handle, 3);
assert_eq!(lhs.as_ref(), &[1, 2, 3]);
assert_eq!(rhs.as_ref(), &[4, 5, 6]);Sourcepub const fn split_at_checked(
this: Self,
mid: usize,
) -> Result<(Self, Self), Self>
pub const fn split_at_checked( this: Self, mid: usize, ) -> Result<(Self, Self), Self>
Split the Handle at the given mid, returning the left and right
sides of the array.
If mid is greater than or equal to self.len(), then the original
Handle is returned in the Err variant.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_slice_from_iter_in(&arena, [1, 2, 3, 4, 5, 6]);
let Err(handle) = Handle::split_at_checked(handle, 7) else {
unreachable!();
};
let (lhs, rhs) = Handle::split_at_checked(handle, 3).unwrap();
assert_eq!(lhs.as_ref(), &[1, 2, 3]);
assert_eq!(rhs.as_ref(), &[4, 5, 6]);Sourcepub const unsafe fn split_at_unchecked(
this: Self,
mid: usize,
) -> (Handle<'a, [T]>, Handle<'a, [T]>)
pub const unsafe fn split_at_unchecked( this: Self, mid: usize, ) -> (Handle<'a, [T]>, Handle<'a, [T]>)
Split the Handle at the given mid, returning the left and right
sides of the array.
§Safety
The given mid must be less than the length of the Buffer, otherwise this
method will trigger undefined behavior.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_slice_from_iter_in(&arena, [1, 2, 3, 4, 5, 6, 7]);
let (lhs, rhs) = unsafe { Handle::split_at_unchecked(handle, 1) };
assert_eq!(lhs.as_ref(), &[1]);
assert_eq!(rhs.as_ref(), &[2, 3, 4, 5, 6, 7]);pub fn iter(&self) -> <&[T] as IntoIterator>::IntoIter ⓘ
pub fn iter_mut(&mut self) -> <&mut [T] as IntoIterator>::IntoIter ⓘ
pub fn iter_handles(this: Self) -> IntoIterHandles<'a, T> ⓘ
Sourcepub const fn transpose_into_uninit(this: Self) -> Handle<'a, [MaybeUninit<T>]> ⓘ
pub const fn transpose_into_uninit(this: Self) -> Handle<'a, [MaybeUninit<T>]> ⓘ
Transpose a Handle of slice T into a slice of Uninit<T>.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_slice_from_iter_in(&arena, [1, 2, 3, 4, 5, 6, 7]);
let handle = Handle::transpose_into_uninit(handle);Source§impl<'a, T: Copy> Handle<'a, [T]>
impl<'a, T: Copy> Handle<'a, [T]>
Sourcepub fn new_slice_splat_in<A: Allocator>(
arena: &'a Arena<A>,
slice_len: usize,
value: T,
) -> Self
pub fn new_slice_splat_in<A: Allocator>( arena: &'a Arena<A>, slice_len: usize, value: T, ) -> Self
Create a new slice handle slice_len long, filled with value.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_slice_splat_in(&arena, 255, 123);
assert_eq!(handle.as_ref(), &[123; 255]);Source§impl<'a, T> Handle<'a, MaybeUninit<T>>
impl<'a, T> Handle<'a, MaybeUninit<T>>
Sourcepub const unsafe fn assume_init(this: Self) -> Handle<'a, T> ⓘ
pub const unsafe fn assume_init(this: Self) -> Handle<'a, T> ⓘ
Consumes the Handle, returning a new Handle which treats its contents
as fully initialized.
§Safety
This method must be called on a Handle which has had its contents fully
initialized, otherwise it may permit access to uninitialized memory.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = unsafe {
let mut handle = Handle::new_uninit_in(&arena);
handle.as_mut().write(28);
Handle::assume_init(handle)
};
assert_eq!(*handle, 28);Sourcepub const fn init(this: Self, value: T) -> Handle<'a, T> ⓘ
pub const fn init(this: Self, value: T) -> Handle<'a, T> ⓘ
Writes the value into the Handle and initilizes it.
Owership over value is transferred into the Handle. Any
data previously written to the Handle is overwritten.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_uninit_in(&arena);
let handle = Handle::init(handle, 25);
assert_eq!(*handle, 25);Source§impl<'a, T> Handle<'a, [MaybeUninit<T>]>
impl<'a, T> Handle<'a, [MaybeUninit<T>]>
pub const unsafe fn assume_init_slice(this: Self) -> Handle<'a, [T]> ⓘ
Source§impl<'a> Handle<'a, str>
impl<'a> Handle<'a, str>
Sourcepub fn new_str_in<S: ?Sized + AsRef<str>, A: Allocator>(
arena: &'a Arena<A>,
string: &S,
) -> Self
pub fn new_str_in<S: ?Sized + AsRef<str>, A: Allocator>( arena: &'a Arena<A>, string: &S, ) -> Self
Create a new Handle containing the given string.
§Examples
use rotunda::{Arena, handle::Handle};
let arena = Arena::new();
let handle = Handle::new_str_in(&arena, "Some Data");
assert_eq!(&handle, "Some Data");pub const fn from_utf8( bytes: Handle<'a, [u8]>, ) -> Result<Self, FromUtf8Error<'a>>
pub const unsafe fn from_utf8_unchecked(bytes: Handle<'a, [u8]>) -> Self
pub const fn into_bytes(this: Self) -> Handle<'a, [u8]> ⓘ
Trait Implementations§
Source§impl<'a, T: ?Sized> BorrowMut<T> for Handle<'a, T>
impl<'a, T: ?Sized> BorrowMut<T> for Handle<'a, T>
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<'a, R: ?Sized + BufRead> BufRead for Handle<'a, R>
Available on crate feature std only.
impl<'a, R: ?Sized + BufRead> BufRead for Handle<'a, R>
std only.Source§fn fill_buf(&mut self) -> Result<&[u8]>
fn fill_buf(&mut self) -> Result<&[u8]>
Read methods, if empty. Read moreSource§fn consume(&mut self, amount: usize)
fn consume(&mut self, amount: usize)
amount of additional bytes from the internal buffer as having been read.
Subsequent calls to read only return bytes that have not been marked as read. Read moreSource§fn has_data_left(&mut self) -> Result<bool, Error>
fn has_data_left(&mut self) -> Result<bool, Error>
buf_read_has_data_left)read. Read more1.83.0 · Source§fn skip_until(&mut self, byte: u8) -> Result<usize, Error>
fn skip_until(&mut self, byte: u8) -> Result<usize, Error>
byte or EOF is reached. Read more1.0.0 · Source§fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
0xA byte) is reached, and append
them to the provided String buffer. Read moreSource§impl<'a> From<StringBuffer<'a>> for Handle<'a, [u8]>
impl<'a> From<StringBuffer<'a>> for Handle<'a, [u8]>
Source§fn from(value: StringBuffer<'a>) -> Self
fn from(value: StringBuffer<'a>) -> Self
Source§impl<'a> From<StringBuffer<'a>> for Handle<'a, str>
impl<'a> From<StringBuffer<'a>> for Handle<'a, str>
Source§fn from(value: StringBuffer<'a>) -> Self
fn from(value: StringBuffer<'a>) -> Self
Source§impl<'sl: 'a, 'a, T: 'a> IntoIterator for &'sl Handle<'a, [T]>
impl<'sl: 'a, 'a, T: 'a> IntoIterator for &'sl Handle<'a, [T]>
Source§impl<'sl: 'a, 'a, T: 'a> IntoIterator for &'sl mut Handle<'a, [T]>
impl<'sl: 'a, 'a, T: 'a> IntoIterator for &'sl mut Handle<'a, [T]>
Source§impl<'a, T: ?Sized + Ord> Ord for Handle<'a, T>
impl<'a, T: ?Sized + Ord> Ord for Handle<'a, T>
Source§impl<'a> PartialOrd<Handle<'_, str>> for StringBuffer<'a>
impl<'a> PartialOrd<Handle<'_, str>> for StringBuffer<'a>
Source§impl<'a, T: ?Sized + PartialOrd> PartialOrd<T> for Handle<'a, T>
impl<'a, T: ?Sized + PartialOrd> PartialOrd<T> for Handle<'a, T>
Source§impl<'a, T: ?Sized + PartialOrd> PartialOrd for Handle<'a, T>
impl<'a, T: ?Sized + PartialOrd> PartialOrd for Handle<'a, T>
Source§impl<'a, R: ?Sized + Read> Read for Handle<'a, R>
Available on crate feature std only.
impl<'a, R: ?Sized + Read> Read for Handle<'a, R>
std only.Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Source§fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
read, except that it reads into a slice of buffers. Read moreSource§fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
buf. Read moreSource§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
buf. Read moreSource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector)1.0.0 · Source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
buf. Read moreSource§fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
read_buf)Source§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
read_buf)cursor. Read more1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Read. Read more1.0.0 · Source§fn chain<R>(self, next: R) -> Chain<Self, R>
fn chain<R>(self, next: R) -> Chain<Self, R>
Source§impl<'a, W: ?Sized + Write> Write for Handle<'a, W>
Available on crate feature std only.
impl<'a, W: ?Sized + Write> Write for Handle<'a, W>
std only.Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Source§fn write_all(&mut self, buf: &[u8]) -> Result<()>
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector)Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored)