Struct qrsync::QrSyncHttp
source · pub struct QrSyncHttp { /* private fields */ }
Expand description
Main structure implementing the workflow if sending and receving files between devices. It fetches the main IP address, generates the QR code, configures and runs the Rocket worker.
Implementations§
source§impl QrSyncHttp
impl QrSyncHttp
sourcepub fn new(
ip_address: Option<String>,
port: u16,
filename: Option<String>,
root_dir: PathBuf,
light_term: bool,
ipv6: bool
) -> Self
pub fn new( ip_address: Option<String>, port: u16, filename: Option<String>, root_dir: PathBuf, light_term: bool, ipv6: bool ) -> Self
Create a new instance of QrSyncHttp from command line arguments.
sourcepub async fn run(&self) -> QrSyncResult<()>
pub async fn run(&self) -> QrSyncResult<()>
Configure Axum, print the QR code and run the HTTP worker.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for QrSyncHttp
impl Send for QrSyncHttp
impl Sync for QrSyncHttp
impl Unpin for QrSyncHttp
impl UnwindSafe for QrSyncHttp
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