pub enum WireInput {
Bytes(Bytes),
Event(Arc<dyn Any + Send + Sync>),
}Available on crate feature
test-utils and not (target_os=unknown and WebAssembly) only.Expand description
One scripted wire input frame.
Byte-transport wires (SSE, NDJSON, websocket) script raw bytes fed through the provider’s HTTP layer; typed-event wires (bedrock, candle, gemini-grpc) script already-typed SDK events fed to the adapter directly — events-first, no mock transport — which the typed driver downcasts back.
Variants§
Bytes(Bytes)
A raw wire byte frame.
Event(Arc<dyn Any + Send + Sync>)
An already-typed SDK event for a typed-event wire.
Implementations§
Source§impl WireInput
impl WireInput
Sourcepub fn as_bytes(&self) -> Option<&Bytes>
Available on crate features test-utils only.
pub fn as_bytes(&self) -> Option<&Bytes>
test-utils only.The frame’s raw bytes, when it is a byte frame.
Sourcepub fn downcast_event<T>(&self) -> Option<&T>where
T: 'static,
Available on crate features test-utils only.
pub fn downcast_event<T>(&self) -> Option<&T>where
T: 'static,
test-utils only.The frame’s typed event, when it is an event frame of type T.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WireInput
impl !RefUnwindSafe for WireInput
impl !UnwindSafe for WireInput
impl Send for WireInput
impl Sync for WireInput
impl Unpin for WireInput
impl UnsafeUnpin for WireInput
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