pub struct SchemaValueStream { /* private fields */ }Expand description
Guest-side stream leaf. A leaf can hold the recursive WIT resource or the native reader obtained from it. Clones share one take-once state.
Implementations§
Source§impl SchemaValueStream
impl SchemaValueStream
Sourcepub fn from_source(
source: impl SchemaValueStreamSource + 'static,
) -> SchemaValueStream
pub fn from_source( source: impl SchemaValueStreamSource + 'static, ) -> SchemaValueStream
Creates an affine lazy source without starting a producer task.
Trait Implementations§
Source§impl Clone for SchemaValueStream
impl Clone for SchemaValueStream
Source§fn clone(&self) -> SchemaValueStream
fn clone(&self) -> SchemaValueStream
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 moreSource§impl Debug for SchemaValueStream
impl Debug for SchemaValueStream
Source§impl<'de> Deserialize<'de> for SchemaValueStream
impl<'de> Deserialize<'de> for SchemaValueStream
Source§fn deserialize<D>(
_deserializer: D,
) -> Result<SchemaValueStream, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
_deserializer: D,
) -> Result<SchemaValueStream, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromSchema for SchemaValueStream
impl FromSchema for SchemaValueStream
fn from_value(value: &SchemaValue) -> Result<SchemaValueStream, FromSchemaError>
Source§impl FromWire for SchemaValueStream
impl FromWire for SchemaValueStream
fn read_wire( reader: &mut WireReader, index: i32, ) -> Result<SchemaValueStream, WireError>
fn read_result_payload( reader: &mut WireReader, index: Option<i32>, ) -> Result<Self, WireError>
Source§impl IntoSchema for SchemaValueStream
impl IntoSchema for SchemaValueStream
fn type_id() -> TypeId
fn register_in(_builder: &mut SchemaBuilder) -> SchemaType
fn to_value(&self) -> SchemaValue
Source§impl IntoWire for SchemaValueStream
impl IntoWire for SchemaValueStream
fn preflight(&self, resources: &mut WirePreflight) -> Result<(), WireError>
Source§async fn prepare_wire(&self) -> Result<(), WireError>
async fn prepare_wire(&self) -> Result<(), WireError>
Wrap native stream endpoints without reading from them. This is called
only after the complete value has passed resource preflight.
fn write_wire(&self, writer: &mut WireWriter) -> Result<i32, WireError>
Source§const NEEDS_PREPARATION: bool = true
const NEEDS_PREPARATION: bool = true
False only when
prepare_wire is a no-op for every value of this type.
Resource preflight still runs regardless of this flag. Custom and derived
implementations prepare by default, including those with no stream schema.fn write_result_payload( &self, writer: &mut WireWriter, ) -> Result<Option<i32>, WireError>
Source§impl PartialEq for SchemaValueStream
impl PartialEq for SchemaValueStream
Source§impl Serialize for SchemaValueStream
impl Serialize for SchemaValueStream
Source§fn serialize<S>(
&self,
_serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
_serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl WireSchema for SchemaValueStream
impl WireSchema for SchemaValueStream
fn contains_stream(_: &mut HashSet<&'static str>) -> bool
fn append_schema(builder: &mut WireSchemaBuilder) -> i32
const IS_UNIT: bool = false
fn wire_type_id() -> String
Auto Trait Implementations§
impl Freeze for SchemaValueStream
impl RefUnwindSafe for SchemaValueStream
impl Send for SchemaValueStream
impl Sync for SchemaValueStream
impl Unpin for SchemaValueStream
impl UnsafeUnpin for SchemaValueStream
impl UnwindSafe for SchemaValueStream
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