pub struct ClientBuilder {
pub iat_mode: IAT,
pub station_pubkey: [u8; 32],
pub station_id: [u8; 20],
pub statefile_path: Option<String>,
/* private fields */
}Fields§
§iat_mode: IAT§station_pubkey: [u8; 32]§station_id: [u8; 20]§statefile_path: Option<String>Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn from_statefile(location: &str) -> Result<Self>
pub fn from_statefile(location: &str) -> Result<Self>
TODO: implement client builder from statefile
Sourcepub fn from_params(param_strs: Vec<impl AsRef<[u8]>>) -> Result<Self>
pub fn from_params(param_strs: Vec<impl AsRef<[u8]>>) -> Result<Self>
TODO: implement client builder from string args
pub fn with_node_pubkey(&mut self, pubkey: [u8; 32]) -> &mut Self
pub fn with_statefile_path(&mut self, path: &str) -> &mut Self
pub fn with_node_id(&mut self, id: [u8; 20]) -> &mut Self
pub fn with_iat_mode(&mut self, iat: IAT) -> &mut Self
pub fn with_handshake_timeout(&mut self, d: Duration) -> &mut Self
pub fn with_handshake_deadline(&mut self, deadline: Instant) -> &mut Self
pub fn fail_fast(&mut self) -> &mut Self
pub fn build(&self) -> Client
pub fn as_opts(&self) -> String
Trait Implementations§
Source§impl<T> ClientBuilder<T> for ClientBuilder
impl<T> ClientBuilder<T> for ClientBuilder
Source§fn build(&self) -> Self::ClientPT
fn build(&self) -> Self::ClientPT
Builds a new PtCommonParameters.
Errors If a required field has not been initialized.
Source§fn options(&mut self, opts: &Args) -> Result<&mut Self, Self::Error>
fn options(&mut self, opts: &Args) -> Result<&mut Self, Self::Error>
Pluggable transport attempts to parse and validate options from a string, typically using [‘parse_smethod_args’].
Source§fn statefile_location(&mut self, _path: &str) -> Result<&mut Self, Self::Error>
fn statefile_location(&mut self, _path: &str) -> Result<&mut Self, Self::Error>
A path where the launched PT can store state.
Source§fn timeout(
&mut self,
_timeout: Option<Duration>,
) -> Result<&mut Self, Self::Error>
fn timeout( &mut self, _timeout: Option<Duration>, ) -> Result<&mut Self, Self::Error>
The maximum time we should wait for a pluggable transport binary to
report successful initialization. If None, a default value is used.
Source§fn v4_bind_addr(
&mut self,
_addr: SocketAddrV4,
) -> Result<&mut Self, Self::Error>
fn v4_bind_addr( &mut self, _addr: SocketAddrV4, ) -> Result<&mut Self, Self::Error>
An IPv4 address to bind outgoing connections to (if specified).
Leaving this out will mean the PT uses a sane default.
Source§fn v6_bind_addr(
&mut self,
_addr: SocketAddrV6,
) -> Result<&mut Self, Self::Error>
fn v6_bind_addr( &mut self, _addr: SocketAddrV6, ) -> Result<&mut Self, Self::Error>
An IPv6 address to bind outgoing connections to (if specified).
Leaving this out will mean the PT uses a sane default.
type ClientPT = Client
type Error = Error
type Transport = Transport<T>
Source§fn method_name() -> String
fn method_name() -> String
Returns a string identifier for this transport
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientBuilder
impl Debug for ClientBuilder
Source§impl Default for ClientBuilder
impl Default for ClientBuilder
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnwindSafe for ClientBuilder
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more