pub struct PyBytesWriter<'py> { /* private fields */ }Expand description
Type used to create a PyBytes, used in PyBytes::new_with_writer.
Implementations§
Source§impl<'py> PyBytesWriter<'py>
impl<'py> PyBytesWriter<'py>
Trait Implementations§
Source§impl<'py> Drop for PyBytesWriter<'py>
Available on non-Py_LIMITED_API only.
impl<'py> Drop for PyBytesWriter<'py>
Available on non-
Py_LIMITED_API only.Source§impl<'py> IntoPyObject<'py> for PyBytesWriter<'py>
impl<'py> IntoPyObject<'py> for PyBytesWriter<'py>
Source§const OUTPUT_TYPE: PyStaticExpr = PyBytes::TYPE_HINT
const OUTPUT_TYPE: PyStaticExpr = PyBytes::TYPE_HINT
Extracts the type hint information for this type when it appears as a return value. Read more
Source§impl Write for PyBytesWriter<'_>
Available on wip_feature_std and non-Py_LIMITED_API only.
impl Write for PyBytesWriter<'_>
Available on
wip_feature_std and non-Py_LIMITED_API only.Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn write_all(&mut self, buf: &[u8]) -> Result<()>
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this writer. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
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>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<'py> !Send for PyBytesWriter<'py>
impl<'py> !Sync for PyBytesWriter<'py>
impl<'py> Freeze for PyBytesWriter<'py>
impl<'py> RefUnwindSafe for PyBytesWriter<'py>
impl<'py> Unpin for PyBytesWriter<'py>
impl<'py> UnsafeUnpin for PyBytesWriter<'py>
impl<'py> UnwindSafe for PyBytesWriter<'py>
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
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>>
fn into_bound_py_any(self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>>
Converts
self into an owned Python object, dropping type information.