(buf: &'a mut [u8])
| 230 | impl<'a> UserAccount<'a> { |
| 231 | #[allow(missing_docs)] |
| 232 | pub fn from_buffer(buf: &'a mut [u8]) -> Result<Self, ProgramError> { |
| 233 | let user_acc = UserAccount::from_buffer_unchecked(buf).unwrap(); |
| 234 | if user_acc.header.tag != AccountTag::UserAccount as u64 { |
| 235 | return Err(ProgramError::InvalidAccountData); |
| 236 | }; |
| 237 | Ok(user_acc) |
| 238 | } |
| 239 | |
| 240 | #[allow(missing_docs)] |
| 241 | pub fn from_buffer_unchecked(buf: &'a mut [u8]) -> Result<Self, ProgramError> { |
nothing calls this directly
no outgoing calls
no test coverage detected