Struct splinter::registry::NodeBuilder
source · [−]pub struct NodeBuilder { /* private fields */ }
Expand description
A builder for creating new nodes.
Implementations
sourceimpl NodeBuilder
impl NodeBuilder
sourcepub fn new<S: Into<String>>(identity: S) -> Self
pub fn new<S: Into<String>>(identity: S) -> Self
Create a new NodeBuilder
with the node’s identity
.
sourcepub fn with_endpoint<S: Into<String>>(self, endpoint: S) -> Self
pub fn with_endpoint<S: Into<String>>(self, endpoint: S) -> Self
Add the endpoint
to the builder.
sourcepub fn with_endpoints<V: Into<Vec<String>>>(self, endpoints: V) -> Self
pub fn with_endpoints<V: Into<Vec<String>>>(self, endpoints: V) -> Self
Add all of the endpoints
to the builder.
sourcepub fn with_display_name<S: Into<String>>(self, display_name: S) -> Self
pub fn with_display_name<S: Into<String>>(self, display_name: S) -> Self
Set the node’s display_name
.
sourcepub fn with_keys<V: Into<Vec<String>>>(self, keys: V) -> Self
pub fn with_keys<V: Into<Vec<String>>>(self, keys: V) -> Self
Add all of the keys
to the builder.
sourcepub fn with_metadata<S: Into<String>>(self, key: S, value: S) -> Self
pub fn with_metadata<S: Into<String>>(self, key: S, value: S) -> Self
Add the key
/value
pair to the node’s metadata.
sourcepub fn build(self) -> Result<Node, InvalidNodeError>
pub fn build(self) -> Result<Node, InvalidNodeError>
Attempt to build the Node
.
Auto Trait Implementations
impl RefUnwindSafe for NodeBuilder
impl Send for NodeBuilder
impl Sync for NodeBuilder
impl Unpin for NodeBuilder
impl UnwindSafe for NodeBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<P, N> IntoBytes<P> for N where
P: Message + FromNative<N>,
impl<P, N> IntoBytes<P> for N where
P: Message + FromNative<N>,
fn into_bytes(self) -> Result<Vec<u8, Global>, ProtoConversionError>
sourceimpl<N, P> IntoNative<N> for P where
N: FromProto<P>,
impl<N, P> IntoNative<N> for P where
N: FromProto<P>,
fn into_native(self) -> Result<N, ProtoConversionError>
sourceimpl<N, P> IntoProto<P> for N where
P: FromNative<N>,
impl<N, P> IntoProto<P> for N where
P: FromNative<N>,
fn into_proto(self) -> Result<P, ProtoConversionError>
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Convert self
to an expression for Diesel’s query builder. Read more
sourcefn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more