pub enum Error {
Show 13 variants
ComInit(Error),
ParsePath {
path: PathBuf,
source: Error,
},
BindToParent(Error),
NoCommonParent,
GetContextMenu(Error),
QueryContextMenu(Error),
TrackPopupMenu(Error),
InvokeCommand(Error),
GetCommandString(Error),
GetMenuItemInfo(Error),
CreateWindow(Error),
RegisterClass(Error),
Windows(Error),
}Expand description
Errors that can occur when working with Windows shell context menus.
Variants§
ComInit(Error)
COM runtime failed to initialize.
ParsePath
A filesystem path could not be resolved to a shell item (PIDL).
BindToParent(Error)
SHBindToParent could not locate the parent IShellFolder.
NoCommonParent
Multiple paths were provided that do not share a common parent folder.
GetContextMenu(Error)
The shell folder refused to hand out an IContextMenu interface.
QueryContextMenu(Error)
IContextMenu::QueryContextMenu failed.
TrackPopupMenu(Error)
TrackPopupMenu failed to display the context menu.
InvokeCommand(Error)
IContextMenu::InvokeCommand failed to execute the selected command.
GetCommandString(Error)
IContextMenu::GetCommandString failed.
GetMenuItemInfo(Error)
GetMenuItemInfoW failed to retrieve menu item metadata.
CreateWindow(Error)
Failed to create the hidden owner window used for submenu rendering.
RegisterClass(Error)
Failed to register the window class for the hidden owner window.
Windows(Error)
Catch-all for other Windows API errors.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()