Struct tidb_query_datatype::codec::mysql::time::Time [−][src]
Implementations
impl Time
[src][−]
fn get_year(&self) -> u32
[src]
fn set_year(&mut self, value: u32)
[src]
fn get_month(&self) -> u32
[src]
fn set_month(&mut self, value: u32)
[src]
fn get_day(&self) -> u32
[src]
fn set_day(&mut self, value: u32)
[src]
fn get_hour(&self) -> u32
[src]
fn set_hour(&mut self, value: u32)
[src]
fn get_minute(&self) -> u32
[src]
fn set_minute(&mut self, value: u32)
[src]
fn get_second(&self) -> u32
[src]
fn set_second(&mut self, value: u32)
[src]
fn get_micro(&self) -> u32
[src]
fn set_micro(&mut self, value: u32)
[src]
fn get_fsp_tt(&self) -> u8
[src]
fn set_fsp_tt(&mut self, value: u8)
[src]
impl Time
[src][−]
pub fn hour(self) -> u32
[src][−]
Returns the hour number from 0 to 23.
pub fn minute(self) -> u32
[src][−]
Returns the minute number from 0 to 59.
pub fn second(self) -> u32
[src][−]
Returns the second number from 0 to 59.
pub fn micro(self) -> u32
[src][−]
Returns the number of microseconds since the whole second.
pub fn year(self) -> u32
[src][−]
Returns the year number
pub fn month(self) -> u32
[src][−]
Returns the month number
pub fn day(self) -> u32
[src][−]
Returns the day number
pub fn period_to_month(period: u64) -> u64
[src][−]
used to convert period to month
pub fn month_to_period(month: u64) -> u64
[src][−]
used to convert month to period
impl Time
[src][−]
pub fn parse(
ctx: &mut EvalContext,
input: &str,
time_type: TimeType,
fsp: i8,
round: bool
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: &str,
time_type: TimeType,
fsp: i8,
round: bool
) -> Result<Time>
pub fn parse_datetime(
ctx: &mut EvalContext,
input: &str,
fsp: i8,
round: bool
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: &str,
fsp: i8,
round: bool
) -> Result<Time>
pub fn parse_date(ctx: &mut EvalContext, input: &str) -> Result<Time>
[src]
pub fn parse_timestamp(
ctx: &mut EvalContext,
input: &str,
fsp: i8,
round: bool
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: &str,
fsp: i8,
round: bool
) -> Result<Time>
pub fn parse_from_i64(
ctx: &mut EvalContext,
input: i64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: i64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
pub fn parse_from_decimal(
ctx: &mut EvalContext,
input: &Decimal,
time_type: TimeType,
fsp: i8,
round: bool
) -> Result<Time>
[src]
ctx: &mut EvalContext,
input: &Decimal,
time_type: TimeType,
fsp: i8,
round: bool
) -> Result<Time>
impl Time
[src][−]
fn from_slice(
ctx: &mut EvalContext,
parts: &[u32],
time_type: TimeType,
fsp: u8
) -> Option<Self>
[src]
ctx: &mut EvalContext,
parts: &[u32],
time_type: TimeType,
fsp: u8
) -> Option<Self>
fn from_aligned_i64(
ctx: &mut EvalContext,
input: i64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
[src][−]
ctx: &mut EvalContext,
input: i64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
Construct a Time
via a number in format: yyyymmddhhmmss
fn into_array(self) -> [u32; 7]
[src]
fn try_from_chrono_datetime<T: Datelike + Timelike>(
ctx: &mut EvalContext,
datetime: T,
time_type: TimeType,
fsp: i8
) -> Result<Self>
[src]
ctx: &mut EvalContext,
datetime: T,
time_type: TimeType,
fsp: i8
) -> Result<Self>
fn try_into_chrono_datetime(self, ctx: &mut EvalContext) -> Result<DateTime<Tz>>
[src]
fn try_into_chrono_naive_datetime(self) -> Result<NaiveDateTime>
[src]
fn unchecked_new(config: TimeArgs) -> Self
[src]
fn new(ctx: &mut EvalContext, config: TimeArgs) -> Result<Time>
[src]
fn check_month_and_day(
year: u32,
month: u32,
day: u32,
allow_invalid_date: bool
) -> Result<()>
[src]
year: u32,
month: u32,
day: u32,
allow_invalid_date: bool
) -> Result<()>
pub fn is_zero(self) -> bool
[src]
pub fn zero(ctx: &mut EvalContext, fsp: i8, time_type: TimeType) -> Result<Self>
[src]
pub fn is_leap_year(self) -> bool
[src]
pub fn last_day_of_month(self) -> u32
[src]
pub fn last_date_of_month(self) -> Option<Self>
[src]
pub fn fsp(self) -> u8
[src]
fn set_fsp(&mut self, fsp: u8)
[src]
pub fn maximize_fsp(&mut self)
[src]
pub fn minimize_fsp(&mut self)
[src]
pub fn get_time_type(self) -> TimeType
[src]
pub fn set_time_type(&mut self, time_type: TimeType) -> Result<()>
[src]
fn set_tt(&mut self, time_type: TimeType)
[src]
pub fn from_packed_u64(
ctx: &mut EvalContext,
value: u64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
[src]
ctx: &mut EvalContext,
value: u64,
time_type: TimeType,
fsp: i8
) -> Result<Time>
pub fn to_packed_u64(self, ctx: &mut EvalContext) -> Result<u64>
[src]
pub fn from_duration(
ctx: &mut EvalContext,
duration: Duration,
time_type: TimeType
) -> Result<Self>
[src]
ctx: &mut EvalContext,
duration: Duration,
time_type: TimeType
) -> Result<Self>
pub fn from_year(
ctx: &mut EvalContext,
year: u32,
fsp: i8,
time_type: TimeType
) -> Result<Self>
[src]
ctx: &mut EvalContext,
year: u32,
fsp: i8,
time_type: TimeType
) -> Result<Self>
pub fn round_frac(self, ctx: &mut EvalContext, fsp: i8) -> Result<Self>
[src]
pub fn normalized(self, ctx: &mut EvalContext) -> Result<Self>
[src]
pub fn checked_add(self, ctx: &mut EvalContext, rhs: Duration) -> Option<Time>
[src]
pub fn checked_sub(self, ctx: &mut EvalContext, rhs: Duration) -> Option<Time>
[src]
pub fn date_diff(self, other: Self) -> Option<i64>
[src]
pub fn ordinal(self) -> i32
[src]
pub fn weekday(self) -> Weekday
[src]
fn write_date_format_segment(self, b: char, output: &mut String) -> Result<()>
[src]
pub fn date_format(self, layout: &str) -> Result<String>
[src]
pub fn to_numeric_string(self) -> String
[src][−]
Converts a DateTime
to printable string representation
pub fn parse_fsp(s: &str) -> i8
[src]
pub fn invalid_zero(self) -> bool
[src]
pub fn from_days(ctx: &mut EvalContext, daynr: u32) -> Result<Self>
[src]
fn get_date_from_daynr(daynr: u32) -> (u32, u32, u32)
[src]
Trait Implementations
impl AsMySQLBool for Time
[src][+]
impl<T> BitRange<T> for Time where
u64: BitRange<T>,
[src][+]
u64: BitRange<T>,
impl Clone for Time
[src][+]
impl ConvertTo<Decimal> for Time
[src][+]
impl ConvertTo<Duration> for Time
[src][+]
impl ConvertTo<Json> for Time
[src][+]
impl ConvertTo<f64> for Time
[src][+]
impl Copy for Time
[src]
impl DateTimeExtension for Time
[src][+]
impl Debug for Time
[src][+]
impl Default for Time
[src][+]
impl Display for Time
[src][+]
impl Eq for Time
[src]
impl Evaluable for DateTime
[src][+]
impl EvaluableRet for DateTime
[src][+]
impl From<Time> for ScalarValue
[src][+]
impl From<Time> for Datum
[src][+]
impl Hash for Time
[src][+]
impl Ord for Time
[src][+]
impl PartialEq<Time> for Time
[src][+]
impl PartialOrd<Time> for Time
[src][+]
impl<'a> RawDatumDecoder<Time> for &'a [u8]
[src][+]
impl ToInt for DateTime
[src][+]
impl VectorValueExt<Time> for VectorValue
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Bit for T where
T: BitRange<u8>,
[src][+]
T: BitRange<u8>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src][+]
W: ConvertTo<V>,
impl<T> ConvertTo<NotNan<f64>> for T where
T: ConvertTo<f64> + EvaluableRet,
[src][+]
T: ConvertTo<f64> + EvaluableRet,
impl<T> ConvertTo<String> for T where
T: ToString + EvaluableRet,
[src][+]
T: ToString + EvaluableRet,
impl<T> ConvertTo<Vec<u8, Global>> for T where
T: ToString + EvaluableRet,
[src][+]
T: ToString + EvaluableRet,
impl<T> ConvertTo<i64> for T where
T: ToInt,
[src][+]
T: ToInt,
impl<T> ConvertTo<u64> for T where
T: ToInt,
[src][+]
T: ToInt,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src][+]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> Pointable for T
[src][+]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src][+]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,