Struct truck_rendimpl::polymesh::base::BoundingBox [−]
bounding box
Implementations
impl<F, V> BoundingBox<V> where
V: MetricSpace<Metric = F> + Index<usize, Output = F> + Bounded<F> + Copy,
F: BaseFloat,
V: MetricSpace<Metric = F> + Index<usize, Output = F> + Bounded<F> + Copy,
F: BaseFloat,
pub fn new() -> BoundingBox<V>
Creats an empty bounding box
pub fn push(&mut self, point: &V)
Adds a point to the bouding box.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); bdd_box.push(&Vector2::new(-1.0, 1.0)); bdd_box.push(&Vector2::new(1.0, -1.0)); assert_eq!(bdd_box.min(), &Vector2::new(-1.0, -1.0)); assert_eq!(bdd_box.max(), &Vector2::new(1.0, 1.0));
Remarks
If the added point has NAN component, then the point is not added.
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); bdd_box.push(&Vector2::new(-1.0, 1.0)); bdd_box.push(&Vector2::new(1.0, -1.0)); bdd_box.push(&Vector2::new(std::f64::NAN, 1.0)); bdd_box.push(&Vector2::new(-1.0, std::f64::NAN)); assert_eq!(bdd_box.min(), &Vector2::new(-1.0, -1.0)); assert_eq!(bdd_box.max(), &Vector2::new(1.0, 1.0));
pub fn is_empty(&self) -> bool
Returns the bounding box is empty or not.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); assert!(bdd_box.is_empty()); bdd_box.push(&Vector2::new(-1.0, 1.0)); assert!(!bdd_box.is_empty());
pub fn max(&self) -> &V
Returns the reference to the maximum point.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); bdd_box.push(&Vector2::new(-1.0, 1.0)); bdd_box.push(&Vector2::new(1.0, -1.0)); assert_eq!(bdd_box.max(), &Vector2::new(1.0, 1.0));
Remarks
If the bounding box is empty, returned vector consists NEG_INFINITY
components.
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let bdd_box = BoundingBox::<Vector2>::new(); assert_eq!(bdd_box.max(), &Vector2::from([f64::NEG_INFINITY; 2]));
pub fn min(&self) -> &V
Returns the reference to the minimal point.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); bdd_box.push(&Vector2::new(-1.0, 1.0)); bdd_box.push(&Vector2::new(1.0, -1.0)); assert_eq!(bdd_box.min(), &Vector2::new(-1.0, -1.0));
Remarks
If the bounding box is empty, returned vector consists INFINITY
components.
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let bdd_box = BoundingBox::<Vector2>::new(); assert_eq!(bdd_box.min(), &Vector2::from([f64::INFINITY; 2]));
pub fn diagonal(&self) -> <V as Bounded<F>>::Vector
Returns the diagonal vector.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); bdd_box.push(&Vector2::new(-2.0, -3.0)); bdd_box.push(&Vector2::new(6.0, 4.0)); assert_eq!(bdd_box.diagonal(), Vector2::new(8.0, 7.0));
Remarks
If the bounding box is empty, returned vector consists f64::NEG_INFINITY
components.
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let bdd_box = BoundingBox::<Vector2>::new(); assert_eq!(bdd_box.diagonal(), Vector2::new(f64::NEG_INFINITY, f64::NEG_INFINITY));
pub fn diameter(&self) -> F
Returns the diameter of the bounding box.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); bdd_box.push(&Vector2::new(-1.0, -3.0)); bdd_box.push(&Vector2::new(2.0, 1.0)); assert_eq!(bdd_box.diameter(), 5.0);
Remarks
If the bounding box is empty, returnes f64::NEG_INFINITY
.
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let bdd_box = BoundingBox::<Vector3>::new(); assert_eq!(bdd_box.diameter(), f64::NEG_INFINITY);
pub fn size(&self) -> F
Returns the maximum length of the edges of the bounding box.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); bdd_box.push(&Vector3::new(-1.0, -3.0, 2.0)); bdd_box.push(&Vector3::new(2.0, 1.0, 10.0)); assert_eq!(bdd_box.size(), 8.0);
Remarks
If the bounding box is empty, returnes f64::NEG_INFINITY
.
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let bdd_box = BoundingBox::<Vector3>::new(); assert_eq!(bdd_box.size(), f64::NEG_INFINITY);
pub fn center(&self) -> V
Returns the center of the bounding box.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let mut bdd_box = BoundingBox::new(); bdd_box.push(&Vector2::new(-1.0, -3.0)); bdd_box.push(&Vector2::new(5.0, 1.0)); assert_eq!(bdd_box.center(), Vector2::new(2.0, -1.0));
Remarks
If the bounding box is empty, returned vector consists std::f64::NAN
components.
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; let bdd_box = BoundingBox::<Vector3>::new(); let center = bdd_box.center(); assert!(center[0].is_nan()); assert!(center[1].is_nan()); assert!(center[2].is_nan());
Trait Implementations
impl<'_, F, V> Add<&'_ BoundingBox<V>> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
type Output = BoundingBox<V>
The resulting type after applying the +
operator.
pub fn add(self, other: &BoundingBox<V>) -> BoundingBox<V>
Returns the direct sum of self
and other.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let bdd_box0 = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); let bdd_box1 = BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); let bdd_box = bdd_box0 + &bdd_box1; assert_eq!(bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(bdd_box.max(), &Vector2::new(7.0, 6.0)); let cloned_bdd_box = bdd_box + &BoundingBox::new(); assert_eq!(cloned_bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(cloned_bdd_box.max(), &Vector2::new(7.0, 6.0));
impl<'_, '_, F, V> Add<&'_ BoundingBox<V>> for &'_ BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
type Output = BoundingBox<V>
The resulting type after applying the +
operator.
pub fn add(self, other: &BoundingBox<V>) -> BoundingBox<V>
Returns the direct sum of self
and other.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let bdd_box0 = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); let bdd_box1 = BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); let bdd_box = &bdd_box0 + &bdd_box1; assert_eq!(bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(bdd_box.max(), &Vector2::new(7.0, 6.0)); let cloned_bdd_box = &bdd_box + &BoundingBox::new(); assert_eq!(cloned_bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(cloned_bdd_box.max(), &Vector2::new(7.0, 6.0));
impl<F, V> Add<BoundingBox<V>> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
type Output = BoundingBox<V>
The resulting type after applying the +
operator.
pub fn add(self, other: BoundingBox<V>) -> BoundingBox<V>
Returns the direct sum of self
and other.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let bdd_box0 = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); let bdd_box1 = BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); let bdd_box = bdd_box0 + bdd_box1; assert_eq!(bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(bdd_box.max(), &Vector2::new(7.0, 6.0)); let cloned_bdd_box = bdd_box + BoundingBox::new(); assert_eq!(cloned_bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(cloned_bdd_box.max(), &Vector2::new(7.0, 6.0));
impl<'_, F, V> Add<BoundingBox<V>> for &'_ BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
type Output = BoundingBox<V>
The resulting type after applying the +
operator.
pub fn add(self, other: BoundingBox<V>) -> BoundingBox<V>
Returns the direct sum of self
and other.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let bdd_box0 = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); let bdd_box1 = BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); let bdd_box = &bdd_box0 + bdd_box1; assert_eq!(bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(bdd_box.max(), &Vector2::new(7.0, 6.0)); let cloned_bdd_box = &bdd_box + BoundingBox::new(); assert_eq!(cloned_bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(cloned_bdd_box.max(), &Vector2::new(7.0, 6.0));
impl<'_, F, V> AddAssign<&'_ BoundingBox<V>> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
pub fn add_assign(&mut self, other: &BoundingBox<V>)
Puts the points in other
into self
.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let mut bdd_box = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); bdd_box += &BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); assert_eq!(bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(bdd_box.max(), &Vector2::new(7.0, 6.0)); bdd_box += &BoundingBox::new(); assert_eq!(bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(bdd_box.max(), &Vector2::new(7.0, 6.0));
impl<F, V> AddAssign<BoundingBox<V>> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
pub fn add_assign(&mut self, other: BoundingBox<V>)
Puts the points in other
into self
.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let mut bdd_box = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); bdd_box += BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); assert_eq!(bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(bdd_box.max(), &Vector2::new(7.0, 6.0)); bdd_box += BoundingBox::new(); assert_eq!(bdd_box.min(), &Vector2::new(3.0, 1.0)); assert_eq!(bdd_box.max(), &Vector2::new(7.0, 6.0));
impl<'_, '_, F, V> BitXor<&'_ BoundingBox<V>> for &'_ BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
type Output = BoundingBox<V>
The resulting type after applying the ^
operator.
pub fn bitxor(self, other: &BoundingBox<V>) -> BoundingBox<V>
Returns the intersection of self
and other
.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let bdd_box0 = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); let bdd_box1 = BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); let bdd_box = &bdd_box0 ^ &bdd_box1; assert_eq!(bdd_box.min(), &Vector2::new(4.0, 2.0)); assert_eq!(bdd_box.max(), &Vector2::new(5.0, 4.0)); let new_empty = &bdd_box ^ &BoundingBox::new(); assert!(new_empty.is_empty());
impl<'_, F, V> BitXor<&'_ BoundingBox<V>> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
type Output = BoundingBox<V>
The resulting type after applying the ^
operator.
pub fn bitxor(self, other: &BoundingBox<V>) -> BoundingBox<V>
Returns the intersection of self
and other
.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let bdd_box0 = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); let bdd_box1 = BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); let bdd_box = bdd_box0 ^ &bdd_box1; assert_eq!(bdd_box.min(), &Vector2::new(4.0, 2.0)); assert_eq!(bdd_box.max(), &Vector2::new(5.0, 4.0)); let new_empty = bdd_box ^ &BoundingBox::new(); assert!(new_empty.is_empty());
impl<'_, F, V> BitXor<BoundingBox<V>> for &'_ BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
type Output = BoundingBox<V>
The resulting type after applying the ^
operator.
pub fn bitxor(self, other: BoundingBox<V>) -> BoundingBox<V>
Returns the intersection of self
and other
.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let bdd_box0 = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); let bdd_box1 = BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); let bdd_box = &bdd_box0 ^ bdd_box1; assert_eq!(bdd_box.min(), &Vector2::new(4.0, 2.0)); assert_eq!(bdd_box.max(), &Vector2::new(5.0, 4.0)); let new_empty = &bdd_box ^ BoundingBox::new(); assert!(new_empty.is_empty());
impl<F, V> BitXor<BoundingBox<V>> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
type Output = BoundingBox<V>
The resulting type after applying the ^
operator.
pub fn bitxor(self, other: BoundingBox<V>) -> BoundingBox<V>
Returns the intersection of self
and other
.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let bdd_box0 = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); let bdd_box1 = BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); let bdd_box = bdd_box0 ^ bdd_box1; assert_eq!(bdd_box.min(), &Vector2::new(4.0, 2.0)); assert_eq!(bdd_box.max(), &Vector2::new(5.0, 4.0)); let new_empty = bdd_box ^ BoundingBox::new(); assert!(new_empty.is_empty());
impl<'_, F, V> BitXorAssign<&'_ BoundingBox<V>> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
pub fn bitxor_assign(&mut self, other: &BoundingBox<V>)
Assigns the intersection of self
and other
to self
.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let mut bdd_box = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); bdd_box ^= &BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); assert_eq!(bdd_box.min(), &Vector2::new(4.0, 2.0)); assert_eq!(bdd_box.max(), &Vector2::new(5.0, 4.0)); bdd_box ^= &BoundingBox::new(); assert!(bdd_box.is_empty());
impl<F, V> BitXorAssign<BoundingBox<V>> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
pub fn bitxor_assign(&mut self, other: BoundingBox<V>)
Assigns the intersection of self
and other
to self
.
Examples
use truck_base::{cgmath64::*, bounding_box::*, tolerance::*}; use std::iter::FromIterator; let mut bdd_box = BoundingBox::from_iter(&[ Vector2::new(3.0, 2.0), Vector2::new(5.0, 6.0), ]); bdd_box ^= BoundingBox::from_iter(&[ Vector2::new(4.0, 1.0), Vector2::new(7.0, 4.0), ]); assert_eq!(bdd_box.min(), &Vector2::new(4.0, 2.0)); assert_eq!(bdd_box.max(), &Vector2::new(5.0, 4.0)); bdd_box ^= BoundingBox::new(); assert!(bdd_box.is_empty());
impl<V> Clone for BoundingBox<V> where
V: Clone,
V: Clone,
pub fn clone(&self) -> BoundingBox<V>
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<V> Debug for BoundingBox<V> where
V: Debug,
V: Debug,
impl<'de, V> Deserialize<'de> for BoundingBox<V> where
V: Deserialize<'de>,
V: Deserialize<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<BoundingBox<V>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
__deserializer: __D
) -> Result<BoundingBox<V>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<'a, F, V> FromIterator<&'a V> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
pub fn from_iter<I>(iter: I) -> BoundingBox<V> where
I: IntoIterator<Item = &'a V>,
I: IntoIterator<Item = &'a V>,
impl<F, V> FromIterator<V> for BoundingBox<V> where
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
V: MetricSpace<Metric = F> + Copy + Index<usize, Output = F> + Bounded<F>,
F: BaseFloat,
pub fn from_iter<I>(iter: I) -> BoundingBox<V> where
I: IntoIterator<Item = V>,
I: IntoIterator<Item = V>,
impl<V> PartialEq<BoundingBox<V>> for BoundingBox<V> where
V: PartialEq<V>,
V: PartialEq<V>,
pub fn eq(&self, other: &BoundingBox<V>) -> bool
pub fn ne(&self, other: &BoundingBox<V>) -> bool
impl<V> Serialize for BoundingBox<V> where
V: Serialize,
V: Serialize,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<V> StructuralPartialEq for BoundingBox<V>
Auto Trait Implementations
impl<V> RefUnwindSafe for BoundingBox<V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
impl<V> Send for BoundingBox<V> where
V: Send,
V: Send,
impl<V> Sync for BoundingBox<V> where
V: Sync,
V: Sync,
impl<V> Unpin for BoundingBox<V> where
V: Unpin,
V: Unpin,
impl<V> UnwindSafe for BoundingBox<V> where
V: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,