Enum google_api_proto::google::cloud::bigquery::v2::table_field_schema::RoundingMode
source · #[repr(i32)]pub enum RoundingMode {
Unspecified = 0,
RoundHalfAwayFromZero = 1,
RoundHalfEven = 2,
}
Expand description
Rounding mode options that can be used when storing NUMERIC or BIGNUMERIC values.
Variants§
Unspecified = 0
Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.
RoundHalfAwayFromZero = 1
ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2
RoundHalfEven = 2
ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2
Implementations§
source§impl RoundingMode
impl RoundingMode
source§impl RoundingMode
impl RoundingMode
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.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for RoundingMode
impl Clone for RoundingMode
source§fn clone(&self) -> RoundingMode
fn clone(&self) -> RoundingMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RoundingMode
impl Debug for RoundingMode
source§impl Default for RoundingMode
impl Default for RoundingMode
source§fn default() -> RoundingMode
fn default() -> RoundingMode
source§impl From<RoundingMode> for i32
impl From<RoundingMode> for i32
source§fn from(value: RoundingMode) -> i32
fn from(value: RoundingMode) -> i32
source§impl Hash for RoundingMode
impl Hash for RoundingMode
source§impl Ord for RoundingMode
impl Ord for RoundingMode
source§fn cmp(&self, other: &RoundingMode) -> Ordering
fn cmp(&self, other: &RoundingMode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for RoundingMode
impl PartialEq for RoundingMode
source§fn eq(&self, other: &RoundingMode) -> bool
fn eq(&self, other: &RoundingMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RoundingMode
impl PartialOrd for RoundingMode
source§fn partial_cmp(&self, other: &RoundingMode) -> Option<Ordering>
fn partial_cmp(&self, other: &RoundingMode) -> 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 moresource§impl TryFrom<i32> for RoundingMode
impl TryFrom<i32> for RoundingMode
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<RoundingMode, UnknownEnumValue>
fn try_from(value: i32) -> Result<RoundingMode, UnknownEnumValue>
impl Copy for RoundingMode
impl Eq for RoundingMode
impl StructuralPartialEq for RoundingMode
Auto Trait Implementations§
impl Freeze for RoundingMode
impl RefUnwindSafe for RoundingMode
impl Send for RoundingMode
impl Sync for RoundingMode
impl Unpin for RoundingMode
impl UnwindSafe for RoundingMode
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request