pub struct UploadOptions {
pub theme: String,
pub title: Option<String>,
pub author: Option<String>,
pub cover_image: Option<String>,
pub show_cover: bool,
pub enable_comments: bool,
pub fans_only_comments: bool,
pub source_url: Option<String>,
}
Expand description
Upload options for customizing the upload behavior.
Fields§
§theme: String
Theme name to use for rendering
title: Option<String>
Custom title (overrides extracted title)
Custom author (overrides extracted author)
cover_image: Option<String>
Path to cover image file
show_cover: bool
Whether to show cover image in content
enable_comments: bool
Whether to enable comments
fans_only_comments: bool
Whether only fans can comment
source_url: Option<String>
Source URL for the article
Implementations§
Source§impl UploadOptions
impl UploadOptions
Sourcepub fn with_theme(theme: impl Into<String>) -> Self
pub fn with_theme(theme: impl Into<String>) -> Self
Creates upload options with a specific theme.
Sets the author.
Sourcepub fn cover_image(self, path: impl Into<String>) -> Self
pub fn cover_image(self, path: impl Into<String>) -> Self
Sets the cover image path.
Sourcepub fn show_cover(self, show: bool) -> Self
pub fn show_cover(self, show: bool) -> Self
Sets whether to show the cover image in content.
Sourcepub fn source_url(self, url: impl Into<String>) -> Self
pub fn source_url(self, url: impl Into<String>) -> Self
Sets the source URL.
Trait Implementations§
Source§impl Clone for UploadOptions
impl Clone for UploadOptions
Source§fn clone(&self) -> UploadOptions
fn clone(&self) -> UploadOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UploadOptions
impl Debug for UploadOptions
Auto Trait Implementations§
impl Freeze for UploadOptions
impl RefUnwindSafe for UploadOptions
impl Send for UploadOptions
impl Sync for UploadOptions
impl Unpin for UploadOptions
impl UnwindSafe for UploadOptions
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