Struct ico::IconDir
[−]
[src]
pub struct IconDir { /* fields omitted */ }
A collection of images; the contents of a single ICO or CUR file.
Methods
impl IconDir
[src]
fn new(resource_type: ResourceType) -> IconDir
[src]
Creates a new, empty collection of icons/cursors.
fn resource_type(&self) -> ResourceType
[src]
Returns the type of resource stored in this collection, either icons or cursors.
fn entries(&self) -> &[IconDirEntry]
[src]
Returns the entries in this collection.
fn add_entry(&mut self, entry: IconDirEntry)
[src]
Adds an entry to the collection. Panics if self.resource_type() != entry.resource_type()
.
fn read<R: Read + Seek>(reader: R) -> Result<IconDir>
[src]
Reads an ICO or CUR file into memory.
fn write<W: Write>(&self, writer: W) -> Result<()>
[src]
Writes an ICO or CUR file out to disk.