[−][src]Struct bloguen::util::PolyWrite
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]
ⓘImportant traits for PolyWrite<Wr1, Wr2>fn clone(&self) -> PolyWrite<Wr1, Wr2>
[src]
ⓘImportant traits for PolyWrite<Wr1, Wr2>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Wr1: PartialOrd + Write, Wr2: PartialOrd + Write> PartialOrd<PolyWrite<Wr1, Wr2>> for PolyWrite<Wr1, Wr2>
[src]
fn partial_cmp(&self, other: &PolyWrite<Wr1, Wr2>) -> Option<Ordering>
[src]
fn lt(&self, other: &PolyWrite<Wr1, Wr2>) -> bool
[src]
fn le(&self, other: &PolyWrite<Wr1, Wr2>) -> bool
[src]
fn gt(&self, other: &PolyWrite<Wr1, Wr2>) -> bool
[src]
fn ge(&self, other: &PolyWrite<Wr1, Wr2>) -> bool
[src]
impl<Wr1: PartialEq + Write, Wr2: PartialEq + Write> PartialEq<PolyWrite<Wr1, Wr2>> for PolyWrite<Wr1, Wr2>
[src]
fn eq(&self, other: &PolyWrite<Wr1, Wr2>) -> bool
[src]
fn ne(&self, other: &PolyWrite<Wr1, Wr2>) -> bool
[src]
impl<Wr1: Ord + Write, Wr2: Ord + Write> Ord for PolyWrite<Wr1, Wr2>
[src]
fn cmp(&self, other: &PolyWrite<Wr1, Wr2>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<Wr1: Debug + Write, Wr2: Debug + Write> Debug for PolyWrite<Wr1, Wr2>
[src]
impl<Wr1: Write, Wr2: Write> Write for PolyWrite<Wr1, Wr2>
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize, Error>
1.36.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
impl<Wr1, Wr2> Send for PolyWrite<Wr1, Wr2> where
Wr1: Send,
Wr2: Send,
Wr1: Send,
Wr2: Send,
impl<Wr1, Wr2> Unpin for PolyWrite<Wr1, Wr2> where
Wr1: Unpin,
Wr2: Unpin,
Wr1: Unpin,
Wr2: Unpin,
impl<Wr1, Wr2> Sync for PolyWrite<Wr1, Wr2> where
Wr1: Sync,
Wr2: Sync,
Wr1: Sync,
Wr2: Sync,
impl<Wr1, Wr2> UnwindSafe for PolyWrite<Wr1, Wr2> where
Wr1: UnwindSafe,
Wr2: UnwindSafe,
Wr1: UnwindSafe,
Wr2: UnwindSafe,
impl<Wr1, Wr2> RefUnwindSafe for PolyWrite<Wr1, Wr2> where
Wr1: RefUnwindSafe,
Wr2: RefUnwindSafe,
Wr1: RefUnwindSafe,
Wr2: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> RuleType for T where
T: Copy + Eq + Ord + Hash + Debug,
[src]
T: Copy + Eq + Ord + Hash + Debug,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,