Struct ra_ap_hir::ExpandResult [−]
pub struct ExpandResult<T> { pub value: T, pub err: Option<ExpandError>, }
Fields
value: T
err: Option<ExpandError>
Implementations
impl<T> ExpandResult<T>
impl<T> ExpandResult<T>
pub fn ok(value: T) -> ExpandResult<T>
pub fn only_err(err: ExpandError) -> ExpandResult<T> where
T: Default,
pub fn str_err(err: String) -> ExpandResult<T> where
T: Default,
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> ExpandResult<U>
Trait Implementations
impl<T> Clone for ExpandResult<T> where
T: Clone,
impl<T> Clone for ExpandResult<T> where
T: Clone,
pub fn clone(&self) -> ExpandResult<T>
pub fn clone(&self) -> ExpandResult<T>
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl<T> Debug for ExpandResult<T> where
T: Debug,
impl<T> Debug for ExpandResult<T> where
T: Debug,
impl<T> From<Result<T, ExpandError>> for ExpandResult<T> where
T: Default,
impl<T> From<Result<T, ExpandError>> for ExpandResult<T> where
T: Default,
pub fn from(result: Result<T, ExpandError>) -> ExpandResult<T>
pub fn from(result: Result<T, ExpandError>) -> ExpandResult<T>
Performs the conversion.
impl<T> PartialEq<ExpandResult<T>> for ExpandResult<T> where
T: PartialEq<T>,
impl<T> PartialEq<ExpandResult<T>> for ExpandResult<T> where
T: PartialEq<T>,
pub fn eq(&self, other: &ExpandResult<T>) -> bool
pub fn eq(&self, other: &ExpandResult<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &ExpandResult<T>) -> bool
pub fn ne(&self, other: &ExpandResult<T>) -> bool
This method tests for !=
.
impl<T> Eq for ExpandResult<T> where
T: Eq,
impl<T> StructuralEq for ExpandResult<T>
impl<T> StructuralPartialEq for ExpandResult<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ExpandResult<T> where
T: RefUnwindSafe,
impl<T> Send for ExpandResult<T> where
T: Send,
impl<T> Sync for ExpandResult<T> where
T: Sync,
impl<T> Unpin for ExpandResult<T> where
T: Unpin,
impl<T> UnwindSafe for ExpandResult<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
impl<T> Any for T where
T: Any,