Skip to main content

Accessor

Struct Accessor 

Source
pub struct Accessor<'a> {
    pub name: Option<Cow<'a, str>>,
    pub buffer_view: Idx<BufferView<'static>>,
    pub byte_offset: u64,
    pub ty: ElementType<'a>,
    pub component_type: ComponentType,
    pub normalized: bool,
    pub count: u64,
    pub max: Option<Vec<Number>>,
    pub min: Option<Vec<Number>>,
    pub sparse: Option<Sparse<'a>>,
    pub extensions: Option<Extensions<'a>>,
    pub extras: Option<Extras<'a>>,
}
Expand description

A typed view into a buffer view that contains raw binary data.

Fields§

§name: Option<Cow<'a, str>>

The user-defined name of this object.

§buffer_view: Idx<BufferView<'static>>

The index of the buffer view.

§byte_offset: u64

The offset relative to the start of the buffer view in bytes.

§ty: ElementType<'a>

Specifies if the accessor’s elements are scalars, vectors, or matrices.

§component_type: ComponentType

The data type of the accessor’s components.

§normalized: bool

Specifies whether integer data values are normalized to [0, 1] (for unsigned types) or to [-1, 1] (for signed types) when they are accessed.

§count: u64

The number of elements referenced by this accessor.

§max: Option<Vec<Number>>

Maximum value of each component in this accessor.

§min: Option<Vec<Number>>

Minimum value of each component in this accessor.

§sparse: Option<Sparse<'a>>

Sparse storage of elements that deviate from their initialization value.

§extensions: Option<Extensions<'a>>§extras: Option<Extras<'a>>

Implementations§

Source§

impl Accessor<'_>

Source

pub fn into_owned(self) -> Accessor<'static>

Copy the structure and clone the original values if it’s not owned.

This is always a deep copy of the structure.

Trait Implementations§

Source§

impl<'a> Clone for Accessor<'a>

Source§

fn clone(&self) -> Accessor<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for Accessor<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de: 'a, 'a> Deserialize<'de> for Accessor<'a>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl IntoOwned for Accessor<'_>

Source§

type Owned = Accessor<'static>

The type after obtaining ownership, should be the same as before but with static lifetime.
Source§

fn into_owned(self) -> Self::Owned

Copy the structure and clone the original values if it’s not owned. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Accessor<'a>

§

impl<'a> RefUnwindSafe for Accessor<'a>

§

impl<'a> Send for Accessor<'a>

§

impl<'a> Sync for Accessor<'a>

§

impl<'a> Unpin for Accessor<'a>

§

impl<'a> UnsafeUnpin for Accessor<'a>

§

impl<'a> UnwindSafe for Accessor<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,