Struct winres_edit::Resource
source · pub struct Resource {
pub kind: Id,
pub name: Id,
pub lang: u16,
pub encoded: Arc<Mutex<Vec<u8>>>,
pub decoded: Arc<Mutex<Option<ResourceData>>>,
/* private fields */
}
Expand description
Structure representing a single resource
Fields§
§kind: Id
resource type
name: Id
resource name
lang: u16
u16
language associated with the resource
encoded: Arc<Mutex<Vec<u8>>>
raw resource data
decoded: Arc<Mutex<Option<ResourceData>>>
destructured resource data (not implemented)
Implementations§
source§impl Resource
impl Resource
sourcepub fn new(
resources: &Resources,
rtype: PCSTR,
rname: PCSTR,
rlang: u16,
data: &[u8]
) -> Resource
pub fn new( resources: &Resources, rtype: PCSTR, rname: PCSTR, rlang: u16, data: &[u8] ) -> Resource
Create a new resource instance bound to the Resources
resource manager.
sourcepub fn remove(&self) -> Result<&Self, Error>
pub fn remove(&self) -> Result<&Self, Error>
Remove resource from the associated module (deletes the resource)