pub struct IconDir { /* private fields */ }
Expand description
A collection of images; the contents of a single ICO or CUR file.
Implementations§
Source§impl IconDir
impl IconDir
Sourcepub fn new(resource_type: ResourceType) -> IconDir
pub fn new(resource_type: ResourceType) -> IconDir
Creates a new, empty collection of icons/cursors.
Sourcepub fn resource_type(&self) -> ResourceType
pub fn resource_type(&self) -> ResourceType
Returns the type of resource stored in this collection, either icons or cursors.
Sourcepub fn entries(&self) -> &[IconDirEntry]
pub fn entries(&self) -> &[IconDirEntry]
Returns the entries in this collection.
Sourcepub fn add_entry(&mut self, entry: IconDirEntry)
pub fn add_entry(&mut self, entry: IconDirEntry)
Adds an entry to the collection. Panics if self.resource_type() != entry.resource_type()
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IconDir
impl RefUnwindSafe for IconDir
impl Send for IconDir
impl Sync for IconDir
impl Unpin for IconDir
impl UnwindSafe for IconDir
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