mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-24 21:40:48 +02:00
chore: update documentation
This commit is contained in:
@@ -13,24 +13,42 @@ pub struct HapticsOptions {
|
||||
}
|
||||
*/
|
||||
|
||||
/// The style of an impact-feedback haptic.
|
||||
///
|
||||
/// On iOS this maps directly to a `UIImpactFeedbackGenerator.FeedbackStyle` case. On Android,
|
||||
/// which has no equivalent system API, each style instead plays a distinct vibration waveform of
|
||||
/// increasing intensity. Has no effect on desktop platforms. Defaults to `Medium`.
|
||||
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "specta", derive(specta::Type))]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum ImpactFeedbackStyle {
|
||||
/// A collision between small, light user interface elements.
|
||||
Light,
|
||||
/// A collision between moderately sized user interface elements.
|
||||
#[default]
|
||||
Medium,
|
||||
/// A collision between large, heavy user interface elements.
|
||||
Heavy,
|
||||
/// A soft, muted impact between user interface elements.
|
||||
Soft,
|
||||
/// A sharp, rigid impact between user interface elements.
|
||||
Rigid,
|
||||
}
|
||||
|
||||
/// The type of notification feedback, indicating the outcome of a task or action.
|
||||
///
|
||||
/// On iOS this maps directly to a `UINotificationFeedbackGenerator.FeedbackType` case. On
|
||||
/// Android, which has no equivalent system API, each type instead plays a distinct vibration
|
||||
/// waveform. Has no effect on desktop platforms. Defaults to `Success`.
|
||||
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "specta", derive(specta::Type))]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum NotificationFeedbackType {
|
||||
/// A task or action has completed successfully.
|
||||
#[default]
|
||||
Success,
|
||||
/// A task or action has produced a warning.
|
||||
Warning,
|
||||
/// A task or action has failed.
|
||||
Error,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user