pub struct MarshalWriter<W> { /* private fields */ }Expand description
Marshal 序列化器
Implementations§
Source§impl<W: Write> MarshalWriter<W>
impl<W: Write> MarshalWriter<W>
Sourcepub fn new(writer: W, version: PythonVersion) -> Self
pub fn new(writer: W, version: PythonVersion) -> Self
创建一个新的 MarshalWriter 实例
Sourcepub fn write_object(&mut self, obj: &PythonObject) -> Result<()>
pub fn write_object(&mut self, obj: &PythonObject) -> Result<()>
写入一个 Python 对象
Sourcepub fn write_code_object(&mut self, code: &PythonCodeObject) -> Result<()>
pub fn write_code_object(&mut self, code: &PythonCodeObject) -> Result<()>
写入一个 Python 代码对象
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for MarshalWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for MarshalWriter<W>where
W: RefUnwindSafe,
impl<W> Send for MarshalWriter<W>where
W: Send,
impl<W> Sync for MarshalWriter<W>where
W: Sync,
impl<W> Unpin for MarshalWriter<W>where
W: Unpin,
impl<W> UnwindSafe for MarshalWriter<W>where
W: UnwindSafe,
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