Struct bitcoin_test::StaticContentsSock
source · pub struct StaticContentsSock { /* private fields */ }
Expand description
| A mocked Sock alternative that returns | a statically contained data upon read | and succeeds and ignores all writes. | The data to be returned is given to the | constructor and when it is exhausted | an EOF is returned by further reads. |
Implementations§
source§impl StaticContentsSock
impl StaticContentsSock
pub fn new(contents: &String) -> Self
pub fn assign_from(&mut self, other: Sock) -> &mut StaticContentsSock
pub fn reset(&mut self)
pub fn send(&self, _0: *const c_void, len: usize, _2: i32) -> isize
pub fn recv(&self, buf: *mut c_void, len: usize, flags: i32) -> isize
pub fn connect(&self, _0: *const SocketAddr, _1: socklen_t) -> i32
pub fn get_sock_opt( &self, level: i32, opt_name: i32, opt_val: *mut c_void, opt_len: *mut socklen_t ) -> i32
pub fn wait( &self, timeout: Duration, requested: event, occurred: Option<*mut event> ) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StaticContentsSock
impl Send for StaticContentsSock
impl !Sync for StaticContentsSock
impl Unpin for StaticContentsSock
impl UnwindSafe for StaticContentsSock
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more