Struct Layer

Source
pub struct Layer<P, O> {
    pub objects: Vec<PointObject<P, O>>,
}
Expand description

A struct representing a layer of point objects.

The Layer struct is generic over the point type P and options type O.

Fields§

§objects: Vec<PointObject<P, O>>

A vector of PointObjects in the layer.

Implementations§

Source§

impl<P, O> Layer<P, O>

Source

pub fn new() -> Self

Creates a new empty Layer.

Trait Implementations§

Source§

impl<P: Default, O: Default> Default for Layer<P, O>

Source§

fn default() -> Layer<P, O>

Returns the “default value” for a type. Read more
Source§

impl<S: SizeSettings, P: FromStream<S>, O: FromStream<S>> FromStream<S> for Layer<P, O>

Source§

fn from_stream<R: Read>(stream: &mut R) -> Result<Self>

Reads a value of this type from a stream and returns it. Returns an error on failure instead.
Source§

impl<S: SizeSettings, P: ToStream<S>, O: ToStream<S>> ToStream<S> for Layer<P, O>

Source§

fn to_stream<W: Write>(&self, stream: &mut W) -> Result<()>

Writes a value of this type to a stream. Return an error on failure.

Auto Trait Implementations§

§

impl<P, O> Freeze for Layer<P, O>

§

impl<P, O> RefUnwindSafe for Layer<P, O>

§

impl<P, O> Send for Layer<P, O>
where O: Send, P: Send,

§

impl<P, O> Sync for Layer<P, O>
where O: Sync, P: Sync,

§

impl<P, O> Unpin for Layer<P, O>
where O: Unpin, P: Unpin,

§

impl<P, O> UnwindSafe for Layer<P, O>
where O: UnwindSafe, P: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.