pub struct Split { /* private fields */ }
Implementations
sourceimpl Split
impl Split
pub const fn empty() -> Self
pub fn from_cards(pile: Cards, left_len: usize) -> Self
pub fn from_left(left_pile: Cards) -> Self
pub fn from_right(right_pile: Cards) -> Split
pub fn left(&self) -> Segment<'_>
pub fn right(&self) -> Segment<'_>
pub fn right_mut(&mut self) -> SegmentMut<'_>
pub fn cards_split(&self) -> (&[Card], &[Card])
pub fn set_left_length(&mut self, len: usize)
pub fn set_right_length(&mut self, len: usize)
Trait Implementations
sourceimpl Extend<Card> for Split
impl Extend<Card> for Split
sourcefn extend<I>(&mut self, cards: I)where
I: IntoIterator<Item = Card>,
fn extend<I>(&mut self, cards: I)where
I: IntoIterator<Item = Card>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<'a> IntoIterator for &'a Split
impl<'a> IntoIterator for &'a Split
type IntoIter = impl Iterator<Item = <&'a Split as IntoIterator>::Item, Item = <&'a Split as IntoIterator>::Item, Item = <&'a Split as IntoIterator>::Item> + DoubleEndedIterator + ExactSizeIterator
type IntoIter = impl Iterator<Item = <&'a Split as IntoIterator>::Item, Item = <&'a Split as IntoIterator>::Item, Item = <&'a Split as IntoIterator>::Item> + DoubleEndedIterator + ExactSizeIterator
Which kind of iterator are we turning this into?
sourceimpl IntoIterator for Split
impl IntoIterator for Split
type IntoIter = impl Iterator<Item = <Split as IntoIterator>::Item, Item = <Split as IntoIterator>::Item, Item = <Split as IntoIterator>::Item> + DoubleEndedIterator + ExactSizeIterator
type IntoIter = impl Iterator<Item = <Split as IntoIterator>::Item, Item = <Split as IntoIterator>::Item, Item = <Split as IntoIterator>::Item> + DoubleEndedIterator + ExactSizeIterator
Which kind of iterator are we turning this into?
sourceimpl PileMut for Split
impl PileMut for Split
fn take_at_most(&mut self, count: usize) -> Cards
fn take_at_most_one(&mut self) -> Option<Card>
fn take_or_none(&mut self, count: usize) -> Option<Cards>
fn take_exactly(&mut self, count: usize) -> Cards
fn take_exactly_one(&mut self) -> Card
fn take_all(&mut self) -> Cards
fn place<I>(&mut self, cards: I)where
I: IntoIterator<Item = Card>,
fn place_one(&mut self, card: Card)
impl Eq for Split
impl StructuralEq for Split
impl StructuralPartialEq for Split
Auto Trait Implementations
impl RefUnwindSafe for Split
impl Send for Split
impl Sync for Split
impl Unpin for Split
impl UnwindSafe for Split
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more