Trait Open

Source
pub trait Open<'a, 'b>: ErrorType + OptionType {
    type Return;

    // Required method
    fn open(
        self,
        options: &'b Self::Options<'b>,
    ) -> Result<Self::Return, Self::Error>
       where Self: Sized,
             'b: 'a;
}
Expand description

Types implementing this trait support a Open semantics.

Required Associated Types§

Required Methods§

Source

fn open( self, options: &'b Self::Options<'b>, ) -> Result<Self::Return, Self::Error>
where Self: Sized, 'b: 'a,

Open a resource, using options for configuration.

§Arguments
  • options: The options to use to configure the TLS connection
§Errors

This function can return an error if the resource could not be opened.

§Notes

See TlsSocketOptions for more information on the options you can pass.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Open<'_, '_> for TcpSocket<Unbound>

Source§

impl Open<'_, '_> for UdpSocket<Unbound>

Source§

impl<'a, 'b> Open<'a, 'b> for TlsSocket<'b, NotReady>
where 'a: 'b,