(buf: &'a mut [u8])
| 239 | |
| 240 | #[allow(missing_docs)] |
| 241 | pub fn from_buffer_unchecked(buf: &'a mut [u8]) -> Result<Self, ProgramError> { |
| 242 | let (hd, tl) = buf.split_at_mut(USER_ACCOUNT_HEADER_LEN); |
| 243 | let header: &mut UserAccountHeader = try_from_bytes_mut(hd).unwrap(); |
| 244 | let orders = try_cast_slice_mut(tl).unwrap(); |
| 245 | |
| 246 | Ok(Self { header, orders }) |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | impl<'a> UserAccount<'a> { |
nothing calls this directly
no outgoing calls
no test coverage detected