Skip to main content

use_section

Function use_section 

Source
pub(super) fn use_section<T, L, LF, S, SF>(
    section: SettingsSection,
    load: L,
    save: S,
) -> SectionState<T>
where T: Clone + PartialEq + Default + Send + Sync + 'static, L: FnOnce() -> LF + 'static, LF: Future<Output = Result<T, ApiError>> + 'static, S: Fn(T) -> SF + Copy + Send + Sync + 'static, SF: Future<Output = Result<T, ApiError>> + 'static,
Expand description

读取一次已存值并登记到保存条。save 提交草稿并返回服务端规范化后的值。