Trying cast the subject:
cannot find type `TcpWrapperConnection` in crate `gio`
not found in `gio`
[dependencies.gio]
package = "gio"
version = "0.20.4"
features = ["v2_70"]
It is not implemented or I don't understand something?
Trying cast the subject:
cannot find type `TcpWrapperConnection` in crate `gio`
not found in `gio`
[dependencies.gio]
package = "gio"
version = "0.20.4"
features = ["v2_70"]
It is not implemented or I don't understand something?
Be sure to look at the doc for the Rust API. I'm guessing you want:
Thanks for reply, I'm just trying to extract / cast TlsClientConnection from SocketConnection (when set_tls
is true
) according to documentation:
Note that since
GSocketClient
must return aGSocketConnection
, butGTlsClientConnection
is not aGSocketConnection
, this actually wraps the resultingGTlsClientConnection
in aGTcpWrapperConnection
when returning it. You can useg_tcp_wrapper_connection_get_base_io_stream()
on the return value to extract theGTlsClientConnection
GTcpConnection
is option for SocketClient::set_tls
is false
,
when it set as true
, downcast type should be GTcpWrapperConnection
:
IOStream { inner: TypedObjectRef { inner: 0x5560f6427370, type: GTcpWrapperConnection } }
Maybe call this method?:
This would probably be easier for me if you show the code that produces the error along with the full error. (That is always a good idea when asking for help.)
I don't understand how does GTK organize it API inside, but seems there is no way to cast to that data type, but I should just create new TlsClientConnection
wrapper for IOStream
available, e.g.
TlsClientConnection::new(base_io_stream, server_identity)
base_io_stream
could be received from existing SocketConnection
objectAbout TcpWrapperConnection
I don't know what is that, forgive.
That is what I suggested.