pub struct AppState {Show 13 fields
pub backend: FileBackend,
pub cleanup_interval: Duration,
pub base_url: Url,
pub raw_url: Url,
pub id_length: usize,
pub default_expiry: Duration,
pub max_expiry: Option<Duration>,
pub max_file_size: u64,
pub syntax_set: SyntaxSet,
pub extra_footer_text: Option<String>,
pub about_page: Option<PathBuf>,
pub about_page_content: String,
pub shutdown_tx: Sender<()>,
}
Expand description
A struct that contains all the state and config for bobashare
Fields§
§backend: FileBackend
storage backend
cleanup_interval: Duration
how often between each cleanup
base_url: Url
base URL (ex. http://localhost:3000/
)
raw_url: Url
base URL for downloading raw upload files (ex. http://localhost:3000/raw/
)
id_length: usize
length of randomly generated IDs
default_expiry: Duration
default expiry time
max_expiry: Option<Duration>
maximum expiry time (None
for no maximum)
max_file_size: u64
maximum file size in bytes
syntax_set: SyntaxSet
extra text to display in footer
about_page: Option<PathBuf>
path to markdown file for about page
about_page_content: String
raw markdown text content of about page file
shutdown_tx: Sender<()>
channel to broadcast shutdown – will force all uploads to stop
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl !UnwindSafe for AppState
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