Struct rusoto_s3::StreamingBody
[−]
[src]
pub struct StreamingBody(_);
Methods from Deref<Target = Box<Read>>
fn downcast<T>(self) -> Result<Box<T>, Box<Any + 'static>> where
T: Any,
1.0.0
T: Any,
Attempt to downcast the box to a concrete type.
Examples
use std::any::Any; fn print_if_string(value: Box<Any>) { if let Ok(string) = value.downcast::<String>() { println!("String ({}): {}", string.len(), string); } } fn main() { let my_string = "Hello World".to_string(); print_if_string(Box::new(my_string)); print_if_string(Box::new(0i8)); }
fn downcast<T>(self) -> Result<Box<T>, Box<Any + 'static + Send>> where
T: Any,
1.0.0
T: Any,
Attempt to downcast the box to a concrete type.
Examples
use std::any::Any; fn print_if_string(value: Box<Any + Send>) { if let Ok(string) = value.downcast::<String>() { println!("String ({}): {}", string.len(), string); } } fn main() { let my_string = "Hello World".to_string(); print_if_string(Box::new(my_string)); print_if_string(Box::new(0i8)); }
Trait Implementations
impl Debug for StreamingBody
[src]
impl Deref for StreamingBody
[src]
type Target = Box<Read>
The resulting type after dereferencing
fn deref(&self) -> &Box<Read>
The method called to dereference a value