pub struct DistributedConfigBuilder { /* private fields */ }Expand description
DistributedConfig の builder。
Implementations§
Source§impl DistributedConfigBuilder
impl DistributedConfigBuilder
Sourcepub fn allow_non_loopback(self, allow: bool) -> Self
pub fn allow_non_loopback(self, allow: bool) -> Self
非 loopback の bind・接続を許可する。認証も暗号化も無いため、なりすまし・盗聴の リスクを受け入れられる信頼できるネットワークでだけ使うこと。
Sourcepub fn session_id(self, id: u64) -> Self
pub fn session_id(self, id: u64) -> Self
セッション識別子。誤接続の検出用で、認証ではない。
Sourcepub fn connect_timeout(self, d: Duration) -> Self
pub fn connect_timeout(self, d: Duration) -> Self
接続 1 回の上限。
Sourcepub fn establish_timeout(self, d: Duration) -> Self
pub fn establish_timeout(self, d: Duration) -> Self
集合の確立全体の期限。
Sourcepub fn io_timeout(self, d: Duration) -> Self
pub fn io_timeout(self, d: Duration) -> Self
1 回の読み書きの上限(確立時と all-reduce の両方に適用する)。
Sourcepub fn op_timeout(self, d: Duration) -> Self
pub fn op_timeout(self, d: Duration) -> Self
all-reduce 1 回の全体の絶対期限。
Sourcepub fn build(self) -> Result<DistributedConfig, DistributedError>
pub fn build(self) -> Result<DistributedConfig, DistributedError>
すべてをソケットを開く前に検証して確定する。
§Errors
world_size・rank の範囲外、タイムアウトの 0/巨大値、unspecified・マルチキャスト・
ブロードキャスト・リンクローカルのアドレス、ランク 1 以降のポート 0、opt-in 無しの
非 loopback を DistributedError で拒否する。
Trait Implementations§
Source§impl Clone for DistributedConfigBuilder
impl Clone for DistributedConfigBuilder
Auto Trait Implementations§
impl Freeze for DistributedConfigBuilder
impl RefUnwindSafe for DistributedConfigBuilder
impl Send for DistributedConfigBuilder
impl Sync for DistributedConfigBuilder
impl Unpin for DistributedConfigBuilder
impl UnsafeUnpin for DistributedConfigBuilder
impl UnwindSafe for DistributedConfigBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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