pub trait Wire: Sized {
// Required methods
fn write(&self, w: &mut Writer<'_>);
fn read(r: &mut Reader<'_>) -> Option<Self>;
}Expand description
A value that crosses between wasm instances.
read returns None when the value can’t be read, after it records why
in the reader (Reader::fail): an Option takes less code to pass up
through the reads of a value’s parts than a Result does.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Wire for AlignmentType
impl Wire for AlignmentType
Source§impl Wire for AnchorOffsetPair
impl Wire for AnchorOffsetPair
Source§impl Wire for CanonicalTileID
impl Wire for CanonicalTileID
Source§impl Wire for CirclePitchScaleType
impl Wire for CirclePitchScaleType
Source§impl Wire for ColorRampPropertyValue
impl Wire for ColorRampPropertyValue
Source§impl Wire for ColorSpace
impl Wire for ColorSpace
Source§impl Wire for CrossfadeParameters
impl Wire for CrossfadeParameters
Source§impl Wire for FormatExpression
impl Wire for FormatExpression
Source§impl Wire for FormatExpressionSection
impl Wire for FormatExpressionSection
Source§impl Wire for FormatSectionOverride
impl Wire for FormatSectionOverride
Source§impl Wire for FormattedSection
impl Wire for FormattedSection
Source§impl Wire for HillshadeMethodType
impl Wire for HillshadeMethodType
Source§impl Wire for IconOverlapType
impl Wire for IconOverlapType
Source§impl Wire for IconTextFitType
impl Wire for IconTextFitType
Source§impl Wire for Identifier
impl Wire for Identifier
Source§impl Wire for ImageContent
impl Wire for ImageContent
Source§impl Wire for ImageExpression
impl Wire for ImageExpression
Source§impl Wire for Interpolate
impl Wire for Interpolate
Source§impl Wire for Interpolator
impl Wire for Interpolator
Source§impl Wire for LayerBlendType
impl Wire for LayerBlendType
Source§impl Wire for LightAnchorType
impl Wire for LightAnchorType
Source§impl Wire for LineCapType
impl Wire for LineCapType
Source§impl Wire for LineJoinType
impl Wire for LineJoinType
Source§impl Wire for NoProperties
impl Wire for NoProperties
Source§impl Wire for OverrideDefault
impl Wire for OverrideDefault
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for PossiblyEvaluated
impl Wire for PossiblyEvaluated
Source§impl Wire for ProjectionDefinition
impl Wire for ProjectionDefinition
Source§impl Wire for ProjectionType
impl Wire for ProjectionType
Source§impl Wire for PropertyExpressionBase
Crosses as the expression (shared, see wire.rs)
and what was set on it; the flags are derived from the expression again.
impl Wire for PropertyExpressionBase
Crosses as the expression (shared, see wire.rs) and what was set on it; the flags are derived from the expression again.
Not inlined: every PropertyExpression<T>, PropertyValue<T> and
Evaluated<T> reads and writes one, so inlined it would compile once per
value type.
Source§impl Wire for RasterEncoding
impl Wire for RasterEncoding
Source§impl Wire for RasterResamplingType
impl Wire for RasterResamplingType
Source§impl Wire for ResamplingType
impl Wire for ResamplingType
Source§impl Wire for RotateAnchorType
impl Wire for RotateAnchorType
Source§impl Wire for StyleImage
impl Wire for StyleImage
Source§impl Wire for SubdivisionGranularitySetting
impl Wire for SubdivisionGranularitySetting
Source§impl Wire for SymbolAnchorType
impl Wire for SymbolAnchorType
Source§impl Wire for SymbolHeightAnchorType
impl Wire for SymbolHeightAnchorType
Source§impl Wire for SymbolPlacementType
impl Wire for SymbolPlacementType
Source§impl Wire for SymbolZOrderType
impl Wire for SymbolZOrderType
Source§impl Wire for TextJustifyType
impl Wire for TextJustifyType
Source§impl Wire for TextRotationAlignmentType
impl Wire for TextRotationAlignmentType
Source§impl Wire for TextTransformType
impl Wire for TextTransformType
Source§impl Wire for TextWritingModeType
impl Wire for TextWritingModeType
Source§impl Wire for TransitionOptions
impl Wire for TransitionOptions
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for Transitionable
impl Wire for Transitionable
Source§impl Wire for TranslateAnchorType
impl Wire for TranslateAnchorType
Source§impl Wire for Unevaluated
impl Wire for Unevaluated
Source§impl Wire for Unevaluated
impl Wire for Unevaluated
Source§impl Wire for Unevaluated
impl Wire for Unevaluated
Source§impl Wire for Unevaluated
impl Wire for Unevaluated
Source§impl Wire for Unevaluated
impl Wire for Unevaluated
Source§impl Wire for VerticalAlign
impl Wire for VerticalAlign
Source§impl Wire for VisibilityType
impl Wire for VisibilityType
Source§impl Wire for WorldMapping
A mapping crosses as the name of its registered projection, or none for
Mercator’s, and the reading side takes the mapping that the
StyleRegistry in its context has by that name.
impl Wire for WorldMapping
A mapping crosses as the name of its registered projection, or none for
Mercator’s, and the reading side takes the mapping that the
StyleRegistry in its context has by that name.
Source§impl<A, B, C, D> Wire for (A, B, C, D)
impl<A, B, C, D> Wire for (A, B, C, D)
Source§impl<T> Wire for Arc<T>where
T: Wire,
In full: values that cross once and then by key opt in with shared.
impl<T> Wire for Arc<T>where
T: Wire,
In full: values that cross once and then by key opt in with shared.
Source§impl<T> Wire for LayerStyle<T>where
T: StyleLayerType,
impl<T> Wire for LayerStyle<T>where
T: StyleLayerType,
Source§impl<T> Wire for LineString<T>
impl<T> Wire for LineString<T>
Source§impl<T> Wire for Mutex<RawMutex, T>where
T: Wire,
Available on crate feature parking_lot only.The value behind the lock, which writing locks.
impl<T> Wire for Mutex<RawMutex, T>where
T: Wire,
parking_lot only.The value behind the lock, which writing locks.
Source§impl<T> Wire for PhantomData<T>where
T: ?Sized,
impl<T> Wire for PhantomData<T>where
T: ?Sized,
Source§impl<T> Wire for PropertyExpression<T>where
T: Wire,
impl<T> Wire for PropertyExpression<T>where
T: Wire,
Source§impl<T> Wire for PropertyValue<T>where
T: Wire,
impl<T> Wire for PropertyValue<T>where
T: Wire,
Source§impl<T> Wire for RwLock<RawRwLock, T>where
T: Wire,
Available on crate feature parking_lot only.The value behind the lock, which writing locks.
impl<T> Wire for RwLock<RawRwLock, T>where
T: Wire,
parking_lot only.The value behind the lock, which writing locks.
Source§impl<V> Wire for Transitionable<V>where
V: Wire,
impl<V> Wire for Transitionable<V>where
V: Wire,
Implementors§
impl Wire for FeatureIndex
An index crosses without its tile data, which the side that reads it
sets (set_data).
impl Wire for FontFace
impl Wire for Glyph
impl Wire for GlyphAdjust
impl Wire for GlyphDependencies
impl Wire for GlyphID
impl Wire for GlyphIDType
impl Wire for GlyphMetrics
impl Wire for GlyphPosition
impl Wire for ImagePosition
impl Wire for ImageType
impl Wire for IndexedSubfeature
impl Wire for InterleavedVertexBuffer
impl Wire for InterleavedVertexData
impl Wire for MapMode
impl Wire for OverscaledTileID
impl Wire for RectU16
impl Wire for ShapedText
impl Wire for TileData
impl<P> Wire for LayerBinders<P>where
P: Wire,
impl<T: Pod> Wire for GeometryVec<T>
As the plain values’ bytes (payload::pod). Workers send buckets before
the render thread moves anything out. A payload the host kept in JS
stays there (mln_wire::host_bytes).