pub struct OwnedChanTargetBuilder { /* private fields */ }Expand description
Builder for OwnedChanTarget.
Implementations§
Source§impl OwnedChanTargetBuilder
impl OwnedChanTargetBuilder
Sourcepub fn from_linkspecs(
strictness: Strictness,
linkspecs: &[LinkSpec],
) -> Result<Self, ChanTargetDecodeError>
Available on crate feature decode only.
pub fn from_linkspecs( strictness: Strictness, linkspecs: &[LinkSpec], ) -> Result<Self, ChanTargetDecodeError>
decode only.Construct an OwnedChanTargetBuilder from a list of LinkSpec,
validating it according to a given level of Strictness.
Sourcepub fn from_encoded_linkspecs(
strictness: Strictness,
linkspecs: &[EncodedLinkSpec],
) -> Result<Self, ChanTargetDecodeError>
Available on crate feature decode only.
pub fn from_encoded_linkspecs( strictness: Strictness, linkspecs: &[EncodedLinkSpec], ) -> Result<Self, ChanTargetDecodeError>
decode only.As from_linkspecs, but take a list of encoded linkspecs and fail if
any are known to be ill-formed.
Source§impl OwnedChanTargetBuilder
impl OwnedChanTargetBuilder
Sourcepub fn addrs(&mut self, value: Vec<SocketAddr>) -> &mut Self
pub fn addrs(&mut self, value: Vec<SocketAddr>) -> &mut Self
Copy of the addresses from the underlying ChanTarget.
Sourcepub fn method(&mut self, value: ChannelMethod) -> &mut Self
pub fn method(&mut self, value: ChannelMethod) -> &mut Self
Copy of the channel methods from the underlying ChanTarget.
Sourcepub fn ids(&mut self) -> &mut RelayIdsBuilder
pub fn ids(&mut self) -> &mut RelayIdsBuilder
Identities that this relay provides.
Sourcepub fn build(&self) -> Result<OwnedChanTarget, OwnedChanTargetBuilderError>
pub fn build(&self) -> Result<OwnedChanTarget, OwnedChanTargetBuilderError>
Source§impl OwnedChanTargetBuilder
impl OwnedChanTargetBuilder
Sourcepub fn ed_identity(&mut self, id: Ed25519Identity) -> &mut Self
pub fn ed_identity(&mut self, id: Ed25519Identity) -> &mut Self
Set the ed25519 identity in this builder to id.
Sourcepub fn rsa_identity(&mut self, id: RsaIdentity) -> &mut Self
pub fn rsa_identity(&mut self, id: RsaIdentity) -> &mut Self
Set the RSA identity in this builder to id.
Trait Implementations§
Source§impl Clone for OwnedChanTargetBuilder
impl Clone for OwnedChanTargetBuilder
Source§fn clone(&self) -> OwnedChanTargetBuilder
fn clone(&self) -> OwnedChanTargetBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedChanTargetBuilder
impl Debug for OwnedChanTargetBuilder
Auto Trait Implementations§
impl Freeze for OwnedChanTargetBuilder
impl RefUnwindSafe for OwnedChanTargetBuilder
impl Send for OwnedChanTargetBuilder
impl Sync for OwnedChanTargetBuilder
impl Unpin for OwnedChanTargetBuilder
impl UnwindSafe for OwnedChanTargetBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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