Struct WeekDays

Source
pub struct WeekDays(/* private fields */);
Expand description

每星期的天数配置。如配置(选中)周一……周六

Trait Implementations§

Source§

impl Clone for WeekDays

Source§

fn clone(&self) -> WeekDays

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ConfigOperator for WeekDays

Source§

const DEFAULT_MAX: u64 = 254u64

满值:即全选的值,比如星期7天全选,则为二进制1111 1110
Source§

const MIN: u64 = 1u64

最小值:比如星期配置,则最小为星期1,即为1,即0b10,即u64的第1位为1
Source§

const MAX: u64 = 7u64

最大值:比如星期配置,则最大为星期日,即为7,即0b10000000,即u64的第7位为1
Source§

type DataTy = WeekDay

Source§

fn _default() -> Self

Source§

fn min_val(&self) -> Self::DataTy

Source§

fn next(&self, index: Self::DataTy) -> Option<Self::DataTy>

Source§

fn _val(&self) -> u64

Source§

fn _val_mut(&mut self, val: u64)

Source§

fn default_value(val: Self::DataTy) -> Self

Source§

fn default_range(range: impl RangeBounds<Self::DataTy>) -> Result<Self>

Source§

fn default_all() -> Self

Source§

fn default_all_by_max(max: Self::DataTy) -> Self

Source§

fn default_array(vals: &[Self::DataTy]) -> Self

Source§

fn add_array(self, vals: &[Self::DataTy]) -> Self

Source§

fn add(self, index: Self::DataTy) -> Self

Source§

fn add_range(self, range: impl RangeBounds<Self::DataTy>) -> Result<Self>

Source§

fn merge(&self, other: &Self) -> Self

生成2者的并集
Source§

fn intersection(&self, other: &Self) -> Self

生成2者的交集
Source§

fn to_vec(&self) -> Vec<u64>

Source§

fn contain(&self, index: Self::DataTy) -> bool

Source§

fn _next(&self, index: Self::DataTy) -> Option<u64>

取下一个持有值,不包括index
Source§

fn _min_val(&self) -> u64

取最小的持有值
Source§

fn is_zero(&self) -> bool

是否啥都没有选
Source§

impl Debug for WeekDays

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.