extendr_api::io::save

Trait Save

Source
pub trait Save: GetSexp {
    // Provided methods
    fn save<P: AsRef<Path>>(
        &self,
        path: &P,
        format: PstreamFormat,
        version: i32,
        hook: Option<WriteHook>,
    ) -> Result<()> { ... }
    fn to_writer<W: Write>(
        &self,
        writer: &mut W,
        format: PstreamFormat,
        version: i32,
        hook: Option<WriteHook>,
    ) -> Result<()> { ... }
}

Provided Methods§

Source

fn save<P: AsRef<Path>>( &self, path: &P, format: PstreamFormat, version: i32, hook: Option<WriteHook>, ) -> Result<()>

Save an object in the R data format. version should probably be 3.

Source

fn to_writer<W: Write>( &self, writer: &mut W, format: PstreamFormat, version: i32, hook: Option<WriteHook>, ) -> Result<()>

Save an object in the R data format to a Write trait. version should probably be 3.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R: GetSexp> Save for R