pub trait MinuteHelper {
// Required methods
fn add_minutes(&self, minute: u32) -> Self;
fn add_minutes_opt(&self, minute: u32) -> Option<Self>
where Self: Sized;
fn begin_of_minute(&self) -> Self;
fn diff_minutes(&self, other: &Self) -> i64;
fn end_of_minute(&self) -> Self;
fn is_same_minute(&self, other: &Self) -> bool;
fn sub_minutes(&self, minute: u32) -> Self;
fn sub_minutes_opt(&self, minute: u32) -> Option<Self>
where Self: Sized;
}Expand description
English: The helper of minute
中文: 分钟助手
Required Methods§
Sourcefn add_minutes(&self, minute: u32) -> Self
fn add_minutes(&self, minute: u32) -> Self
English: Add the specified number of minutes
中文:加上指定的分钟数
Sourcefn add_minutes_opt(&self, minute: u32) -> Option<Self>where
Self: Sized,
fn add_minutes_opt(&self, minute: u32) -> Option<Self>where
Self: Sized,
English: Add the specified number of minutes
中文:加上指定的分钟数
Sourcefn begin_of_minute(&self) -> Self
fn begin_of_minute(&self) -> Self
English: Get the start of one minute
中文: 获取分钟的开始时间
Sourcefn diff_minutes(&self, other: &Self) -> i64
fn diff_minutes(&self, other: &Self) -> i64
English: Get the signed number of full minutes between the given dates.
中文:获取给定时间之间的分钟差
Sourcefn end_of_minute(&self) -> Self
fn end_of_minute(&self) -> Self
English: Get the end of one minute
中文: 获取分钟的结束时间
Sourcefn is_same_minute(&self, other: &Self) -> bool
fn is_same_minute(&self, other: &Self) -> bool
English: Is the same minute
中文: 判断两个时间是否在同一分钟
Sourcefn sub_minutes(&self, minute: u32) -> Self
fn sub_minutes(&self, minute: u32) -> Self
English: Subtract the specified number of minutes
中文:减去给定的分钟数
Sourcefn sub_minutes_opt(&self, minute: u32) -> Option<Self>where
Self: Sized,
fn sub_minutes_opt(&self, minute: u32) -> Option<Self>where
Self: Sized,
English: Subtract the specified number of minutes
中文:减去给定的分钟数
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.