Expand description
SMB2/3 file-sharing server with pluggable storage backends.
Example:
use smb_server::{SmbServer, Share, Access, ShareBackend};
SmbServer::builder()
.listen("0.0.0.0:4445".parse()?)
.user("alice", "password")
.share(Share::new("home", backend).user("alice", Access::ReadWrite))
.build()?
.serve()
.await?;Modules§
Structs§
- Backend
Capabilities - Static, advertised capabilities of a backend.
- Bytes
- A cheaply cloneable and sliceable chunk of contiguous memory.
- Config
Handle - DirEntry
- One entry of a directory listing.
- File
Info - Filesystem-style metadata for a single file or directory.
- File
Times - Optional FILETIME values for
set_times.Nonemeans “leave unchanged”. - Local
FsBackend - Local-filesystem backend, sandboxed at a single root directory.
- Open
Options - Options passed to
ShareBackend::open. - Share
- One share definition, attached to a single backend.
- Shutdown
Handle - Cheaply-clonable shutdown handle. Outlives
SmbServer::serveconsuming the server. - SmbPath
- A validated, component-list path. No
.., no Windows-forbidden chars, no alternate streams. Always relative to the share root; the empty path is the root. - SmbServer
- A built but not-yet-running SMB server.
- SmbServer
Builder - Builder for
SmbServer. SeeSmbServer::builder.
Enums§
- Access
- Access level granted to a user on a share, or to anonymous on a public share.
- Build
Error - Errors raised by
SmbServerBuilder::build. - Config
Error - Identity
- Identity recovered from a successful (or anonymous) authentication.
- Open
Intent - SMB CREATE disposition as seen by a backend.
- Share
Mode - SmbError
- Errors returned by
ShareBackendand surfaced through the SMB protocol.
Traits§
- Handle
- A live open file or directory handle.
- Share
Backend - Pluggable storage backend mounted as a share.