pub struct Sliced<'source, T> { /* private fields */ }Expand description
A value of type T associated with a slice of the source text.
Implementations§
Source§impl<'source, T> Sliced<'source, T>
impl<'source, T> Sliced<'source, T>
Source§impl<'source, T, E> Sliced<'source, Result<T, E>>
impl<'source, T, E> Sliced<'source, Result<T, E>>
Sourcepub fn unzip(self) -> Result<Sliced<'source, T>, Sliced<'source, E>>
pub fn unzip(self) -> Result<Sliced<'source, T>, Sliced<'source, E>>
Unzips an Sliced<Result<T, E>> into a Result<Sliced<T>, Sliced<E>>.
If inner is of the Ok variant this method returns Ok(Sliced { inner: t, .. }.
Otherwise, Err(Sliced { inner: e, .. } is returned. Where t and e represent
the Ok and Err values of the inner Result.
Trait Implementations§
Auto Trait Implementations§
impl<'source, T> Freeze for Sliced<'source, T>where
T: Freeze,
impl<'source, T> RefUnwindSafe for Sliced<'source, T>where
T: RefUnwindSafe,
impl<'source, T> Send for Sliced<'source, T>where
T: Send,
impl<'source, T> Sync for Sliced<'source, T>where
T: Sync,
impl<'source, T> Unpin for Sliced<'source, T>where
T: Unpin,
impl<'source, T> UnwindSafe for Sliced<'source, T>where
T: UnwindSafe,
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