let mut a = TestStruct(TestEnum::AType(String::from("a_type")));
let a: Result<&mut str, TestError> = a.try_as_mut();
assert!(a.is_ok());
let mut a: TestStruct = TestStruct(TestEnum::BType(BType()));
let a: Result<&mut str, TestError> = a.try_as_mut();
assert!(a.is_err());
let mut b = TestStruct(TestEnum::BType(BType()));
let b: Result<&mut BType, TestError> = b.try_as_mut();
assert!(b.is_ok());
let mut b = TestStruct(TestEnum::AType(String::from("a_type")));
let b: Result<&mut BType, TestError> = b.try_as_mut();
assert!(b.is_err());