pub struct FtpServer { /* private fields */ }Expand description
FTP Server implementation for MockForge
Implementations§
Source§impl FtpServer
impl FtpServer
pub fn new(config: FtpConfig) -> Self
Sourcepub fn new_with_fixtures(
config: FtpConfig,
fixtures: Vec<FtpFixture>,
) -> Result<Self>
pub fn new_with_fixtures( config: FtpConfig, fixtures: Vec<FtpFixture>, ) -> Result<Self>
Create a server pre-loaded with FTP fixtures.
FtpSpecRegistry fixtures are attached at construction time via its
builder, so this is the public path for programmatic fixtures
(FtpServer::new starts empty; the registry is immutable afterwards).
pub async fn start(&self) -> Result<()>
pub async fn handle_upload(&self, path: &Path, data: Vec<u8>) -> Result<()>
pub fn spec_registry(&self) -> Arc<FtpSpecRegistry> ⓘ
pub fn vfs(&self) -> Arc<VirtualFileSystem> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FtpServer
impl !UnwindSafe for FtpServer
impl Freeze for FtpServer
impl Send for FtpServer
impl Sync for FtpServer
impl Unpin for FtpServer
impl UnsafeUnpin for FtpServer
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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