pub struct DomainCodecLib { /* private fields */ }Expand description
A host-registered lib that exports one codec (and optionally the Shapes it uses) built from a decoder and encoder.
Implementations§
Source§impl DomainCodecLib
impl DomainCodecLib
Sourcepub fn new(
symbol: Symbol,
codec_id: CodecId,
decoder: Arc<dyn Decoder>,
encoder: Arc<dyn Encoder>,
expr_shape_symbol: Symbol,
) -> Self
pub fn new( symbol: Symbol, codec_id: CodecId, decoder: Arc<dyn Decoder>, encoder: Arc<dyn Encoder>, expr_shape_symbol: Symbol, ) -> Self
Build a domain codec lib. expr_shape_symbol is the codec’s expression
shape; it is resolved (at load) from the lib’s own registered shapes,
then the registry, then core/Expr, then core/Any, then nil.
Sourcepub fn with_shapes(self, shapes: Vec<(Symbol, ShapeRef)>) -> Self
pub fn with_shapes(self, shapes: Vec<(Symbol, ShapeRef)>) -> Self
Also register these Shapes when the lib loads (for codecs like
codec:scene that own their domain’s node Shapes).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DomainCodecLib
impl !UnwindSafe for DomainCodecLib
impl Freeze for DomainCodecLib
impl Send for DomainCodecLib
impl Sync for DomainCodecLib
impl Unpin for DomainCodecLib
impl UnsafeUnpin for DomainCodecLib
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