pub enum ReqIdRef<'a> {
U64(u64),
Bytes(&'a [u8]),
}
Variants§
Implementations§
Source§impl<'a> ReqIdRef<'a>
impl<'a> ReqIdRef<'a>
Sourcepub fn as_u64_mut(&mut self) -> Option<&mut u64>
pub fn as_u64_mut(&mut self) -> Option<&mut u64>
Optionally returns mutable references to the inner fields if this is a ReqIdRef::U64
, otherwise None
Sourcepub fn as_u64(&self) -> Option<&u64>
pub fn as_u64(&self) -> Option<&u64>
Optionally returns references to the inner fields if this is a ReqIdRef::U64
, otherwise None
Sourcepub fn into_u64(self) -> Result<u64, Self>
pub fn into_u64(self) -> Result<u64, Self>
Returns the inner fields if this is a ReqIdRef::U64
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_bytes_mut(&mut self) -> Option<&mut &'a [u8]>
pub fn as_bytes_mut(&mut self) -> Option<&mut &'a [u8]>
Optionally returns mutable references to the inner fields if this is a ReqIdRef::Bytes
, otherwise None
Sourcepub fn as_bytes(&self) -> Option<&&'a [u8]>
pub fn as_bytes(&self) -> Option<&&'a [u8]>
Optionally returns references to the inner fields if this is a ReqIdRef::Bytes
, otherwise None
Sourcepub fn into_bytes(self) -> Result<&'a [u8], Self>
pub fn into_bytes(self) -> Result<&'a [u8], Self>
Returns the inner fields if this is a ReqIdRef::Bytes
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ReqIdRef<'a>
impl<'a> RefUnwindSafe for ReqIdRef<'a>
impl<'a> Send for ReqIdRef<'a>
impl<'a> Sync for ReqIdRef<'a>
impl<'a> Unpin for ReqIdRef<'a>
impl<'a> UnwindSafe for ReqIdRef<'a>
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