30 |
pub fn as_ref(&self) -> OptionSerializer<&T> {
|
31 |
#[allow(clippy::needless_match)] // The nightly clippy used by CI is incorrect here
|
32 |
match self {
|
30 |
pub fn as_ref(&self) -> OptionSerializer<&T> {
|
31 |
#[allow(clippy::needless_match)] // The nightly clippy used by CI is incorrect here
|
32 |
match self {
|
126 |
/// Maps `self` into an Option containing a reference to the inner value if `self` is `Some` or `None` otherwise
|
127 |
#[allow(clippy::needless_match)] // False positive
|
128 |
pub const fn as_ref(&self) -> Option<&T> {
|
135 |
/// Maps `self` into an Option containing a mutable reference to the inner value if `self` is `Some` or `None` otherwise
|
136 |
#[allow(clippy::needless_match)] // False positive
|
137 |
pub fn as_mut(&mut self) -> Option<&mut T> {
|
144 |
/// Maps `self` into an Option dereferencing the inner value if `self` is `Some`, or `None` otherwise.
|
145 |
#[allow(clippy::needless_match)] // False positive
|
146 |
pub fn as_deref(&self) -> Option<&<T as Deref>::Target>
|
156 |
/// Maps `self` into an Option mutably dereferencing the inner value if `self` is `Some`, or `None` otherwise.
|
157 |
#[allow(clippy::needless_match)] // False positive
|
158 |
pub fn as_deref_mut(&mut self) -> Option<&<T as Deref>::Target>
|
74 |
/// Maps self by returning a reference to the contained value, if any, or a reference to the contained error otherwise
|
75 |
#[allow(clippy::needless_match)] // False positive
|
76 |
pub const fn as_ref(&self) -> Result<&T, &E> {
|
83 |
/// Maps self by returning a mutable reference to the contained value, if any, or a mutable reference to the contained error otherwise
|
84 |
#[allow(clippy::needless_match)] // False positive
|
85 |
pub fn as_mut(&mut self) -> Result<&mut T, &mut E> {
|