pub struct BinaryFreeExtension(pub &'static str);Expand description
An extension that owns no binary references.
Opting into binary transforms with the trait’s own empty
ExtensionHandler::collect_binary_references and
ExtensionHandler::remap_binary_references is exactly the statement
“this extension participates and owns nothing”: there is nothing to keep
alive and nothing to rewrite.
Tuple Fields§
§0: &'static strTrait Implementations§
Source§impl Clone for BinaryFreeExtension
impl Clone for BinaryFreeExtension
Source§fn clone(&self) -> BinaryFreeExtension
fn clone(&self) -> BinaryFreeExtension
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BinaryFreeExtension
Source§impl Debug for BinaryFreeExtension
impl Debug for BinaryFreeExtension
Source§impl ExtensionHandler for BinaryFreeExtension
impl ExtensionHandler for BinaryFreeExtension
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Returns the exact glTF extension name handled by this implementation.
Source§fn allows_binary_transform(&self) -> bool
fn allows_binary_transform(&self) -> bool
Whether a transform may replace accessor and buffer-view binary data
while preserving this extension. Handlers must opt in explicitly after
validating their binary-reference semantics.
Source§fn validate(
&self,
_document: &Document,
_context: &mut ExtensionValidationContext,
) -> Result<()>
fn validate( &self, _document: &Document, _context: &mut ExtensionValidationContext, ) -> Result<()>
Performs extension-specific strict validation and records narrowly
scoped core-validation exemptions in
context.Source§fn collect_binary_references(
&self,
_document: &Document,
_accessors: &mut [bool],
_buffer_views: &mut [bool],
) -> Result<()>
fn collect_binary_references( &self, _document: &Document, _accessors: &mut [bool], _buffer_views: &mut [bool], ) -> Result<()>
Marks every accessor and buffer-view reference owned by this extension. Read more
Source§fn remap_binary_references(
&self,
_document: &mut Document,
_accessors: &[Option<usize>],
_buffer_views: &[Option<usize>],
) -> Result<()>
fn remap_binary_references( &self, _document: &mut Document, _accessors: &[Option<usize>], _buffer_views: &[Option<usize>], ) -> Result<()>
Applies the maps produced by binary compaction to references owned by
this extension. This is called only for handlers that explicitly allow
binary transforms.
Source§fn decode_primitive(
&self,
_document: &Document,
_resources: &ResourceStore,
_primitive: PrimitiveRef<'_>,
) -> Option<Result<Mesh>>
fn decode_primitive( &self, _document: &Document, _resources: &ResourceStore, _primitive: PrimitiveRef<'_>, ) -> Option<Result<Mesh>>
Decodes geometry for
primitive, or returns None when this handler
does not own that primitive.Auto Trait Implementations§
impl Freeze for BinaryFreeExtension
impl RefUnwindSafe for BinaryFreeExtension
impl Send for BinaryFreeExtension
impl Sync for BinaryFreeExtension
impl Unpin for BinaryFreeExtension
impl UnsafeUnpin for BinaryFreeExtension
impl UnwindSafe for BinaryFreeExtension
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more