Struct lusl::Serializer

source ·
pub struct Serializer { /* private fields */ }
Expand description

Serializer

Serializer struct.

Call serialize method to serialize all directory contents.

Examples

use lusl::Serializer;
use std::path::PathBuf;
use std::fs;

let original = PathBuf::from("tests");
let result = PathBuf::from("serialized1.bin");
let mut serializer = Serializer::new(original, result.clone()).unwrap();
serializer.serialize().unwrap();
assert!(result.is_file());

Implementations

Set original root directory and result path and create Serializer. May create result file.

Serialize root directory and copy it to result file.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.