[][src]Struct bloguen::util::PolyWrite

pub struct PolyWrite<Wr1: Write, Wr2: Write>(pub Wr1, pub Wr2);

An output sink, writing the data passed thereto to two sinks contained therein.

If an error occurs, it will be propagated out of the first sink first.

The write() funxion returns the bigger of the two written lengths.

Examples

let mut out_1 = vec![];
let mut out_2 = vec![];

PolyWrite(&mut out_1, &mut out_2).write_all("Бenlo".as_bytes()).unwrap();

assert_eq!(out_1, "Бenlo".as_bytes());
assert_eq!(out_2, "Бenlo".as_bytes());

Trait Implementations

impl<Wr1: Eq + Write, Wr2: Eq + Write> Eq for PolyWrite<Wr1, Wr2>[src]

impl<Wr1: Clone + Write, Wr2: Clone + Write> Clone for PolyWrite<Wr1, Wr2>[src]

impl<Wr1: PartialOrd + Write, Wr2: PartialOrd + Write> PartialOrd<PolyWrite<Wr1, Wr2>> for PolyWrite<Wr1, Wr2>[src]

impl<Wr1: PartialEq + Write, Wr2: PartialEq + Write> PartialEq<PolyWrite<Wr1, Wr2>> for PolyWrite<Wr1, Wr2>[src]

impl<Wr1: Ord + Write, Wr2: Ord + Write> Ord for PolyWrite<Wr1, Wr2>[src]

impl<Wr1: Copy + Write, Wr2: Copy + Write> Copy for PolyWrite<Wr1, Wr2>[src]

impl<Wr1: Hash + Write, Wr2: Hash + Write> Hash for PolyWrite<Wr1, Wr2>[src]

impl<Wr1: Debug + Write, Wr2: Debug + Write> Debug for PolyWrite<Wr1, Wr2>[src]

impl<Wr1: Write, Wr2: Write> Write for PolyWrite<Wr1, Wr2>[src]

Auto Trait Implementations

impl<Wr1, Wr2> Send for PolyWrite<Wr1, Wr2> where
    Wr1: Send,
    Wr2: Send

impl<Wr1, Wr2> Unpin for PolyWrite<Wr1, Wr2> where
    Wr1: Unpin,
    Wr2: Unpin

impl<Wr1, Wr2> Sync for PolyWrite<Wr1, Wr2> where
    Wr1: Sync,
    Wr2: Sync

impl<Wr1, Wr2> UnwindSafe for PolyWrite<Wr1, Wr2> where
    Wr1: UnwindSafe,
    Wr2: UnwindSafe

impl<Wr1, Wr2> RefUnwindSafe for PolyWrite<Wr1, Wr2> where
    Wr1: RefUnwindSafe,
    Wr2: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> RuleType for T where
    T: Copy + Eq + Ord + Hash + Debug
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]