useserde::{Deserialize, Serialize};usecrate::Result;usesuper::request;/// Type of Notify
#[derive(Debug, Clone, Serialize, Deserialize)]#[serde(rename_all ="camelCase")]pubenumNotifyType{/// Display the notification in the MetaMask UI
InApp,/// Display the notification in the browser
Native,}#[derive(Debug, Serialize, Deserialize)]structNotifyParams<'a>{#[serde(rename ="type")]pubty: NotifyType,
pubmessage:&'astr,
}/// Displays a notification in MetaMask or natively in the browser.
////// Snap Document: [snap_notify](https://docs.metamask.io/snaps/reference/rpc-api/#snap_notify)
pub async fnnotify(ty: NotifyType, message:&str)->Result<()>{request("snap_notify", NotifyParams { ty, message }).await
}