pub struct TypeConfig {}Trait Implementations§
Source§impl Clone for TypeConfig
impl Clone for TypeConfig
Source§fn clone(&self) -> TypeConfig
fn clone(&self) -> TypeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TypeConfig
Source§impl Debug for TypeConfig
impl Debug for TypeConfig
Source§impl Default for TypeConfig
impl Default for TypeConfig
Source§fn default() -> TypeConfig
fn default() -> TypeConfig
impl Eq for TypeConfig
Source§impl Ord for TypeConfig
impl Ord for TypeConfig
Source§fn cmp(&self, other: &TypeConfig) -> Ordering
fn cmp(&self, other: &TypeConfig) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TypeConfig
impl PartialEq for TypeConfig
Source§impl PartialOrd for TypeConfig
impl PartialOrd for TypeConfig
Source§impl RaftLogReader<TypeConfig> for LogStore
impl RaftLogReader<TypeConfig> for LogStore
Source§async fn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>(
&mut self,
range: RB,
) -> Result<Vec<Entry<TypeConfig>>, StorageError<NodeId>>
async fn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>( &mut self, range: RB, ) -> Result<Vec<Entry<TypeConfig>>, StorageError<NodeId>>
Source§fn limited_get_log_entries(
&mut self,
start: u64,
end: u64,
) -> impl Future<Output = Result<Vec<<C as RaftTypeConfig>::Entry>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
fn limited_get_log_entries( &mut self, start: u64, end: u64, ) -> impl Future<Output = Result<Vec<<C as RaftTypeConfig>::Entry>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
[start, end), end is exclusive,
potentially limited by implementation-defined constraints. Read moreSource§impl RaftLogStorage<TypeConfig> for LogStore
impl RaftLogStorage<TypeConfig> for LogStore
Source§async fn get_log_state(
&mut self,
) -> Result<LogState<TypeConfig>, StorageError<NodeId>>
async fn get_log_state( &mut self, ) -> Result<LogState<TypeConfig>, StorageError<NodeId>>
Source§async fn get_log_reader(&mut self) -> Self::LogReader
async fn get_log_reader(&mut self) -> Self::LogReader
Source§async fn save_vote(
&mut self,
vote: &Vote<NodeId>,
) -> Result<(), StorageError<NodeId>>
async fn save_vote( &mut self, vote: &Vote<NodeId>, ) -> Result<(), StorageError<NodeId>>
Source§async fn read_vote(
&mut self,
) -> Result<Option<Vote<NodeId>>, StorageError<NodeId>>
async fn read_vote( &mut self, ) -> Result<Option<Vote<NodeId>>, StorageError<NodeId>>
Self::save_vote.Source§async fn append<I>(
&mut self,
entries: I,
callback: LogFlushed<TypeConfig>,
) -> Result<(), StorageError<NodeId>>
async fn append<I>( &mut self, entries: I, callback: LogFlushed<TypeConfig>, ) -> Result<(), StorageError<NodeId>>
callback once logs are persisted on disk. Read moreSource§async fn truncate(
&mut self,
log_id: LogId<NodeId>,
) -> Result<(), StorageError<NodeId>>
async fn truncate( &mut self, log_id: LogId<NodeId>, ) -> Result<(), StorageError<NodeId>>
log_id, inclusive Read moreSource§async fn purge(
&mut self,
log_id: LogId<NodeId>,
) -> Result<(), StorageError<NodeId>>
async fn purge( &mut self, log_id: LogId<NodeId>, ) -> Result<(), StorageError<NodeId>>
log_id, inclusive Read moreSource§fn save_committed(
&mut self,
_committed: Option<LogId<<C as RaftTypeConfig>::NodeId>>,
) -> impl Future<Output = Result<(), StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
fn save_committed( &mut self, _committed: Option<LogId<<C as RaftTypeConfig>::NodeId>>, ) -> impl Future<Output = Result<(), StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
Source§fn read_committed(
&mut self,
) -> impl Future<Output = Result<Option<LogId<<C as RaftTypeConfig>::NodeId>>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
fn read_committed( &mut self, ) -> impl Future<Output = Result<Option<LogId<<C as RaftTypeConfig>::NodeId>>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
Self::save_committed.Source§impl RaftNetwork<TypeConfig> for RaftHttpConnection
impl RaftNetwork<TypeConfig> for RaftHttpConnection
Source§async fn append_entries(
&mut self,
rpc: AppendEntriesRequest<TypeConfig>,
_option: RPCOption,
) -> Result<AppendEntriesResponse<NodeId>, RPCError<NodeId, BasicNode, RaftError<NodeId>>>
async fn append_entries( &mut self, rpc: AppendEntriesRequest<TypeConfig>, _option: RPCOption, ) -> Result<AppendEntriesResponse<NodeId>, RPCError<NodeId, BasicNode, RaftError<NodeId>>>
Source§async fn install_snapshot(
&mut self,
rpc: InstallSnapshotRequest<TypeConfig>,
_option: RPCOption,
) -> Result<InstallSnapshotResponse<NodeId>, RPCError<NodeId, BasicNode, RaftError<NodeId, InstallSnapshotError>>>
async fn install_snapshot( &mut self, rpc: InstallSnapshotRequest<TypeConfig>, _option: RPCOption, ) -> Result<InstallSnapshotResponse<NodeId>, RPCError<NodeId, BasicNode, RaftError<NodeId, InstallSnapshotError>>>
Source§async fn vote(
&mut self,
rpc: VoteRequest<NodeId>,
_option: RPCOption,
) -> Result<VoteResponse<NodeId>, RPCError<NodeId, BasicNode, RaftError<NodeId>>>
async fn vote( &mut self, rpc: VoteRequest<NodeId>, _option: RPCOption, ) -> Result<VoteResponse<NodeId>, RPCError<NodeId, BasicNode, RaftError<NodeId>>>
Source§fn full_snapshot(
&mut self,
vote: Vote<<C as RaftTypeConfig>::NodeId>,
snapshot: Snapshot<C>,
cancel: impl Future<Output = ReplicationClosed> + OptionalSend + 'static,
option: RPCOption,
) -> impl Future<Output = Result<SnapshotResponse<<C as RaftTypeConfig>::NodeId>, StreamingError<C, Fatal<<C as RaftTypeConfig>::NodeId>>>> + Send
fn full_snapshot( &mut self, vote: Vote<<C as RaftTypeConfig>::NodeId>, snapshot: Snapshot<C>, cancel: impl Future<Output = ReplicationClosed> + OptionalSend + 'static, option: RPCOption, ) -> impl Future<Output = Result<SnapshotResponse<<C as RaftTypeConfig>::NodeId>, StreamingError<C, Fatal<<C as RaftTypeConfig>::NodeId>>>> + Send
Source§impl RaftSnapshotBuilder<TypeConfig> for StateMachine
impl RaftSnapshotBuilder<TypeConfig> for StateMachine
Source§async fn build_snapshot(
&mut self,
) -> Result<Snapshot<TypeConfig>, StorageError<NodeId>>
async fn build_snapshot( &mut self, ) -> Result<Snapshot<TypeConfig>, StorageError<NodeId>>
Source§impl RaftStateMachine<TypeConfig> for StateMachine
impl RaftStateMachine<TypeConfig> for StateMachine
Source§type SnapshotBuilder = StateMachine
type SnapshotBuilder = StateMachine
Source§async fn applied_state(
&mut self,
) -> Result<(Option<LogId<NodeId>>, StoredMembership<NodeId, BasicNode>), StorageError<NodeId>>
async fn applied_state( &mut self, ) -> Result<(Option<LogId<NodeId>>, StoredMembership<NodeId, BasicNode>), StorageError<NodeId>>
Source§async fn apply<I>(
&mut self,
entries: I,
) -> Result<Vec<ClusterResponse>, StorageError<NodeId>>
async fn apply<I>( &mut self, entries: I, ) -> Result<Vec<ClusterResponse>, StorageError<NodeId>>
Source§async fn get_snapshot_builder(&mut self) -> Self::SnapshotBuilder
async fn get_snapshot_builder(&mut self) -> Self::SnapshotBuilder
Source§async fn begin_receiving_snapshot(
&mut self,
) -> Result<Box<Cursor<Vec<u8>>>, StorageError<NodeId>>
async fn begin_receiving_snapshot( &mut self, ) -> Result<Box<Cursor<Vec<u8>>>, StorageError<NodeId>>
Source§async fn install_snapshot(
&mut self,
meta: &SnapshotMeta<NodeId, BasicNode>,
snapshot: Box<Cursor<Vec<u8>>>,
) -> Result<(), StorageError<NodeId>>
async fn install_snapshot( &mut self, meta: &SnapshotMeta<NodeId, BasicNode>, snapshot: Box<Cursor<Vec<u8>>>, ) -> Result<(), StorageError<NodeId>>
Source§async fn get_current_snapshot(
&mut self,
) -> Result<Option<Snapshot<TypeConfig>>, StorageError<NodeId>>
async fn get_current_snapshot( &mut self, ) -> Result<Option<Snapshot<TypeConfig>>, StorageError<NodeId>>
Source§impl RaftTypeConfig for TypeConfig
impl RaftTypeConfig for TypeConfig
Source§type D = ClusterCommand
type D = ClusterCommand
Source§type R = ClusterResponse
type R = ClusterResponse
Source§type Entry = Entry<TypeConfig>
type Entry = Entry<TypeConfig>
Source§type SnapshotData = Cursor<Vec<u8>>
type SnapshotData = Cursor<Vec<u8>>
Source§type Responder = OneshotResponder<TypeConfig>
type Responder = OneshotResponder<TypeConfig>
WriteResult). Read moreSource§type AsyncRuntime = TokioRuntime
type AsyncRuntime = TokioRuntime
impl StructuralPartialEq for TypeConfig
Auto Trait Implementations§
impl Freeze for TypeConfig
impl RefUnwindSafe for TypeConfig
impl Send for TypeConfig
impl Sync for TypeConfig
impl Unpin for TypeConfig
impl UnsafeUnpin for TypeConfig
impl UnwindSafe for TypeConfig
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> 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> ⓘ
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> ⓘ
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 moreimpl<T> OptionalSend for T
impl<T> OptionalSync for T
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> TypeConfigExt for Twhere
T: RaftTypeConfig,
impl<T> TypeConfigExt for Twhere
T: RaftTypeConfig,
Source§fn now() -> <Self::AsyncRuntime as AsyncRuntime>::Instant
fn now() -> <Self::AsyncRuntime as AsyncRuntime>::Instant
Source§fn sleep(duration: Duration) -> <Self::AsyncRuntime as AsyncRuntime>::Sleep
fn sleep(duration: Duration) -> <Self::AsyncRuntime as AsyncRuntime>::Sleep
duration has elapsed.Source§fn sleep_until(
deadline: <Self::AsyncRuntime as AsyncRuntime>::Instant,
) -> <Self::AsyncRuntime as AsyncRuntime>::Sleep
fn sleep_until( deadline: <Self::AsyncRuntime as AsyncRuntime>::Instant, ) -> <Self::AsyncRuntime as AsyncRuntime>::Sleep
deadline is reached.Source§fn timeout<R, F>(
duration: Duration,
future: F,
) -> <Self::AsyncRuntime as AsyncRuntime>::Timeout<R, F>where
F: Future<Output = R> + OptionalSend,
fn timeout<R, F>(
duration: Duration,
future: F,
) -> <Self::AsyncRuntime as AsyncRuntime>::Timeout<R, F>where
F: Future<Output = R> + OptionalSend,
Future to complete before the specified duration has elapsed.Source§fn timeout_at<R, F>(
deadline: <Self::AsyncRuntime as AsyncRuntime>::Instant,
future: F,
) -> <Self::AsyncRuntime as AsyncRuntime>::Timeout<R, F>where
F: Future<Output = R> + OptionalSend,
fn timeout_at<R, F>(
deadline: <Self::AsyncRuntime as AsyncRuntime>::Instant,
future: F,
) -> <Self::AsyncRuntime as AsyncRuntime>::Timeout<R, F>where
F: Future<Output = R> + OptionalSend,
Future to complete before the specified instant in time.