(&mut self)
| 157 | } |
| 158 | |
| 159 | pub fn get_device_session_mut(&mut self) -> Result<&mut internal::DeviceSession, Error> { |
| 160 | self.device_session |
| 161 | .as_deref_mut() |
| 162 | .ok_or_else(|| Error::NotFound(self.dev_eui.to_string())) |
| 163 | } |
| 164 | |
| 165 | pub fn get_dev_addr(&self) -> Result<DevAddr> { |
| 166 | self.dev_addr.ok_or_else(|| anyhow!("DevAddr is not set")) |