pub struct FilterPresets {
pub slot1: Option<FilterPreset>,
pub slot2: Option<FilterPreset>,
pub slot3: Option<FilterPreset>,
pub slot4: Option<FilterPreset>,
pub slot5: Option<FilterPreset>,
}Expand description
フィルタプリセット設定
Fields§
§slot1: Option<FilterPreset>スロット1-5のプリセット
slot2: Option<FilterPreset>§slot3: Option<FilterPreset>§slot4: Option<FilterPreset>§slot5: Option<FilterPreset>Implementations§
Source§impl FilterPresets
impl FilterPresets
Sourcepub fn config_path() -> Option<PathBuf>
pub fn config_path() -> Option<PathBuf>
設定ファイルのパスを取得
Sourcepub fn get(&self, slot: usize) -> Option<&FilterPreset>
pub fn get(&self, slot: usize) -> Option<&FilterPreset>
スロット番号(1-5)からプリセットを取得
Sourcepub fn set(&mut self, slot: usize, preset: FilterPreset)
pub fn set(&mut self, slot: usize, preset: FilterPreset)
スロット番号(1-5)にプリセットを設定
Sourcepub fn iter(&self) -> impl Iterator<Item = (usize, &FilterPreset)>
pub fn iter(&self) -> impl Iterator<Item = (usize, &FilterPreset)>
全プリセットをイテレート(スロット番号, プリセット)
Sourcepub fn next_empty_slot(&self) -> Option<usize>
pub fn next_empty_slot(&self) -> Option<usize>
空きスロットを取得(最初の空きスロット番号)
Trait Implementations§
Source§impl Clone for FilterPresets
impl Clone for FilterPresets
Source§fn clone(&self) -> FilterPresets
fn clone(&self) -> FilterPresets
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilterPresets
impl Debug for FilterPresets
Source§impl Default for FilterPresets
impl Default for FilterPresets
Source§fn default() -> FilterPresets
fn default() -> FilterPresets
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FilterPresets
impl<'de> Deserialize<'de> for FilterPresets
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FilterPresets
impl RefUnwindSafe for FilterPresets
impl Send for FilterPresets
impl Sync for FilterPresets
impl Unpin for FilterPresets
impl UnwindSafe for FilterPresets
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more