#[repr(i32)]pub enum VariableSynchronization {
Auto,
None,
OnWrite,
OnRead,
}Expand description
Indicates when a distributed variable will be synced.
Variants§
Auto
AUTO: Indicates that the synchronization will be determined by the
current DistributionStrategy (eg. With MirroredStrategy this would be
ON_WRITE).
None
NONE: Indicates that there will only be one copy of the variable, so
there is no need to sync.
OnWrite
ON_WRITE: Indicates that the variable will be updated across devices
every time it is written.
OnRead
ON_READ: Indicates that the variable will be aggregated across devices
when it is read (eg. when checkpointing or when evaluating an op that uses
the variable).
Implementations§
source§impl VariableSynchronization
impl VariableSynchronization
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Trait Implementations§
source§impl Clone for VariableSynchronization
impl Clone for VariableSynchronization
source§fn clone(&self) -> VariableSynchronization
fn clone(&self) -> VariableSynchronization
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for VariableSynchronization
impl Debug for VariableSynchronization
source§impl Default for VariableSynchronization
impl Default for VariableSynchronization
source§fn default() -> VariableSynchronization
fn default() -> VariableSynchronization
source§impl From<VariableSynchronization> for i32
impl From<VariableSynchronization> for i32
source§fn from(value: VariableSynchronization) -> i32
fn from(value: VariableSynchronization) -> i32
source§impl Hash for VariableSynchronization
impl Hash for VariableSynchronization
source§impl Ord for VariableSynchronization
impl Ord for VariableSynchronization
source§fn cmp(&self, other: &VariableSynchronization) -> Ordering
fn cmp(&self, other: &VariableSynchronization) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<VariableSynchronization> for VariableSynchronization
impl PartialEq<VariableSynchronization> for VariableSynchronization
source§fn eq(&self, other: &VariableSynchronization) -> bool
fn eq(&self, other: &VariableSynchronization) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd<VariableSynchronization> for VariableSynchronization
impl PartialOrd<VariableSynchronization> for VariableSynchronization
source§fn partial_cmp(&self, other: &VariableSynchronization) -> Option<Ordering>
fn partial_cmp(&self, other: &VariableSynchronization) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moreimpl Copy for VariableSynchronization
impl Eq for VariableSynchronization
impl StructuralEq for VariableSynchronization
impl StructuralPartialEq for VariableSynchronization
Auto Trait Implementations§
impl RefUnwindSafe for VariableSynchronization
impl Send for VariableSynchronization
impl Sync for VariableSynchronization
impl Unpin for VariableSynchronization
impl UnwindSafe for VariableSynchronization
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
§impl<T> ClampCast for Twhere
T: PartialOrd<T> + Copy + 'static,
impl<T> ClampCast for Twhere T: PartialOrd<T> + Copy + 'static,
fn clamp_cast<O>(self) -> Owhere Self: AsPrimitive<O> + Datum, O: AsPrimitive<Self> + Bounded + Datum,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.