pub struct CreateOptions {
pub title: Option<String>,
pub mode: Option<Mode>,
pub entry_point: Option<String>,
pub manifest: Option<Manifest>,
pub application: Option<Application>,
pub when: Option<SystemTime>,
pub keep_line_endings: bool,
pub store_only: bool,
}Expand description
Options for create.
Fields§
§title: Option<String>Title. Defaults to the manifest’s, then the entry point’s first heading, then its file name.
mode: Option<Mode>Mode. Defaults to the manifest’s, then document.
entry_point: Option<String>Entry point. Defaults to the manifest’s, then discovery (Section 5.5).
manifest: Option<Manifest>Starting manifest: its fields are kept, with this library’s required fields set over them.
application: Option<Application>The application writing the archive.
when: Option<SystemTime>Timestamp for created, modified and the ZIP entries. Defaults to now.
keep_line_endings: boolKeep CRLF in Markdown files. By default Markdown files and the manifest get LF line endings; other files are always written as given (Section 12.2).
store_only: boolStore every file without compression.
Implementations§
Source§impl CreateOptions
impl CreateOptions
Sourcepub fn entry_point(self, path: impl Into<String>) -> Self
pub fn entry_point(self, path: impl Into<String>) -> Self
Set the entry point.
Sourcepub fn application(self, application: Application) -> Self
pub fn application(self, application: Application) -> Self
Set the application.
Sourcepub fn when(self, when: SystemTime) -> Self
pub fn when(self, when: SystemTime) -> Self
Set the timestamp.
Sourcepub fn keep_line_endings(self) -> Self
pub fn keep_line_endings(self) -> Self
Keep CRLF line endings in Markdown files.
Sourcepub fn store_only(self) -> Self
pub fn store_only(self) -> Self
Store files without compression.
Trait Implementations§
Source§impl Clone for CreateOptions
impl Clone for CreateOptions
Source§impl Debug for CreateOptions
impl Debug for CreateOptions
Auto Trait Implementations§
impl Freeze for CreateOptions
impl RefUnwindSafe for CreateOptions
impl Send for CreateOptions
impl Sync for CreateOptions
impl Unpin for CreateOptions
impl UnsafeUnpin for CreateOptions
impl UnwindSafe for CreateOptions
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