pub enum Inner {
A(InnerA),
B(InnerB),
}
Variants§
Implementations§
source§impl Inner
impl Inner
pub fn to_ref<'__superstruct>(&'__superstruct self) -> InnerRef<'__superstruct>
pub fn to_mut<'__superstruct>( &'__superstruct mut self, ) -> InnerRefMut<'__superstruct>
pub fn as_a(&self) -> Result<&InnerA, ()>
pub fn as_a_mut(&mut self) -> Result<&mut InnerA, ()>
pub fn as_b(&self) -> Result<&InnerB, ()>
pub fn as_b_mut(&mut self) -> Result<&mut InnerB, ()>
pub fn both(&self) -> &&'static str
pub fn both_mut(&mut self) -> &mut &'static str
pub fn only_a(&self) -> Result<&'static str, ()>
pub fn only_a_mut(&mut self) -> Result<&mut &'static str, ()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Inner
impl RefUnwindSafe for Inner
impl Send for Inner
impl Sync for Inner
impl Unpin for Inner
impl UnwindSafe for Inner
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)