pub struct StreamingFieldResolver;Expand description
Shared streaming-virtual-fields resolver for e2e test codegen.
Implementations§
Source§impl StreamingFieldResolver
impl StreamingFieldResolver
Sourcepub fn accessor(field: &str, lang: &str, chunks_var: &str) -> Option<String>
pub fn accessor(field: &str, lang: &str, chunks_var: &str) -> Option<String>
Returns the language-specific expression for a streaming-virtual field,
given chunks_var (the collected-list local name) and lang.
Returns None when the field name is not a known streaming-virtual
field or the language has no streaming support.
Sourcepub fn collect_snippet(
lang: &str,
stream_var: &str,
chunks_var: &str,
) -> Option<String>
pub fn collect_snippet( lang: &str, stream_var: &str, chunks_var: &str, ) -> Option<String>
Returns the language-specific stream-collect-into-list snippet that
produces chunks_var from stream_var.
Returns None when the language has no streaming collect support or
when the collect snippet cannot be expressed generically.
Auto Trait Implementations§
impl Freeze for StreamingFieldResolver
impl RefUnwindSafe for StreamingFieldResolver
impl Send for StreamingFieldResolver
impl Sync for StreamingFieldResolver
impl Unpin for StreamingFieldResolver
impl UnsafeUnpin for StreamingFieldResolver
impl UnwindSafe for StreamingFieldResolver
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