Struct tonic_mock::MockBody [−][src]
Implementations
impl MockBody
[src]
pub fn new(data: Vec<impl Message>) -> Self
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
Trait Implementations
impl Body for MockBody
[src]
type Data = Bytes
Values yielded by the Body
.
type Error = Status
The error type this Body
might generate.
fn poll_data(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
fn poll_trailers(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
pub fn is_end_stream(&self) -> bool
[src]
pub fn size_hint(&self) -> SizeHint
[src]
pub fn data(&mut self) -> Data<'_, Self> where
Self: Unpin,
[src]
Self: Unpin,
pub fn trailers(&mut self) -> Trailers<'_, Self> where
Self: Unpin,
[src]
Self: Unpin,
impl Clone for MockBody
[src]
Auto Trait Implementations
impl RefUnwindSafe for MockBody
impl Send for MockBody
impl Sync for MockBody
impl Unpin for MockBody
impl UnwindSafe for MockBody
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Body for T where
T: Body + Send + Sync + 'static,
<T as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send, Global>>,
[src]
T: Body + Send + Sync + 'static,
<T as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send, Global>>,
type Data = <T as Body>::Data
The body data type.
type Error = <T as Body>::Error
The errors produced from the body.
pub fn is_end_stream(&self) -> bool
[src]
pub fn poll_data(
self: Pin<&mut T>,
cx: &mut Context<'_>
) -> Poll<Option<Result<<T as Body>::Data, <T as Body>::Error>>>
[src]
self: Pin<&mut T>,
cx: &mut Context<'_>
) -> Poll<Option<Result<<T as Body>::Data, <T as Body>::Error>>>
pub fn poll_trailers(
self: Pin<&mut T>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap<HeaderValue>>, <T as Body>::Error>>
[src]
self: Pin<&mut T>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap<HeaderValue>>, <T as Body>::Error>>
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,