pub struct FetchOptions {
pub set_id: [u8; 32],
pub descriptor_b3: Option<[u8; 32]>,
pub peers: Vec<String>,
pub out_dir: PathBuf,
pub local: Vec<PathBuf>,
pub want: Want,
pub max_pieces: Option<usize>,
pub tls: Option<ClientTls>,
}Fields§
§set_id: [u8; 32]§descriptor_b3: Option<[u8; 32]>When known, the received descriptor must hash to this value; otherwise only the set id
(archive hash + geometry) is verified and piece hashes stay provisional until join.
peers: Vec<String>§out_dir: PathBuf§local: Vec<PathBuf>Volumes (files or directories) already present locally, besides out_dir.
want: Want§max_pieces: Option<usize>Stop after this many pieces (used to exercise interruption and resume).
tls: Option<ClientTls>None: plain TCP. Some: every connection is TLS, pinned per peer (see ClientTls).
Auto Trait Implementations§
impl Freeze for FetchOptions
impl RefUnwindSafe for FetchOptions
impl Send for FetchOptions
impl Sync for FetchOptions
impl Unpin for FetchOptions
impl UnsafeUnpin for FetchOptions
impl UnwindSafe for FetchOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more