about summary refs log tree commit diff
path: root/gifed/src/block/extension/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gifed/src/block/extension/application.rs')
-rw-r--r--gifed/src/block/extension/application.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/gifed/src/block/extension/application.rs b/gifed/src/block/extension/application.rs
new file mode 100644
index 0000000..9ec1814
--- /dev/null
+++ b/gifed/src/block/extension/application.rs
@@ -0,0 +1,15 @@
+pub struct Application {
+	pub(crate) identifier: String, // max len 8
+	pub(crate) authentication_code: [u8; 3],
+	pub(crate) data: Vec<u8>,
+}
+
+impl Application {
+	pub fn identifier(&self) -> &str {
+		&self.identifier
+	}
+
+	pub fn authentication_code(&self) -> &[u8] {
+		&self.authentication_code
+	}
+}