pub trait Union<Rhs, N, B>{
// Required methods
fn union_in<Dst>(&self, rhs: &Rhs, dst: &mut Dst)
where Dst: ContainerWrite<B, Slot = N>;
fn try_union_in<Dst>(
&self,
rhs: &Rhs,
dst: &mut Dst,
) -> Result<(), UnionError>
where Dst: ContainerWrite<B, Slot = N>;
fn union<Dst>(&self, rhs: &Rhs) -> Dst
where Dst: ContainerWrite<B, Slot = N> + TryWithSlots;
fn try_union<Dst>(&self, rhs: &Rhs) -> Result<Dst, UnionError>
where Dst: ContainerWrite<B, Slot = N> + TryWithSlots;
fn union_len(&self, rhs: &Rhs) -> usize;
}
Expand description
Union operator (a | b).
Required Methods§
Sourcefn union_in<Dst>(&self, rhs: &Rhs, dst: &mut Dst)where
Dst: ContainerWrite<B, Slot = N>,
fn union_in<Dst>(&self, rhs: &Rhs, dst: &mut Dst)where
Dst: ContainerWrite<B, Slot = N>,
Calculates union in-place. Result will be stored in dst
.
§Panic
Panics if dst
cannot fit the entire result.
See non-panic function try_union_in
.
Sourcefn try_union_in<Dst>(&self, rhs: &Rhs, dst: &mut Dst) -> Result<(), UnionError>where
Dst: ContainerWrite<B, Slot = N>,
fn try_union_in<Dst>(&self, rhs: &Rhs, dst: &mut Dst) -> Result<(), UnionError>where
Dst: ContainerWrite<B, Slot = N>,
Calculates union in-place. Result will be stored in dst
.
Returns Err(_)
if dst
cannot fit the entire result.
Sourcefn union<Dst>(&self, rhs: &Rhs) -> Dstwhere
Dst: ContainerWrite<B, Slot = N> + TryWithSlots,
fn union<Dst>(&self, rhs: &Rhs) -> Dstwhere
Dst: ContainerWrite<B, Slot = N> + TryWithSlots,
Calculates union. Result container will be created with try_with_slots
function.
§Panic
Panics if Dst
cannot fit the entire result.
See non-panic function try_union
.
Sourcefn try_union<Dst>(&self, rhs: &Rhs) -> Result<Dst, UnionError>where
Dst: ContainerWrite<B, Slot = N> + TryWithSlots,
fn try_union<Dst>(&self, rhs: &Rhs) -> Result<Dst, UnionError>where
Dst: ContainerWrite<B, Slot = N> + TryWithSlots,
Calculates union. Result container will be created with try_with_slots
function.
Returns Err(_)
if Dst
cannot fit the entire result.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.