Struct scylla::transport::execution_profile::ExecutionProfileHandle
source · pub struct ExecutionProfileHandle(/* private fields */);
Expand description
A handle that points to an ExecutionProfile.
Its goal is to enable remapping all associated entities (query/Session)
to another execution profile at once.
Note: Cloned handles initially point to the same Arc’ed execution profile.
However, as the mapping has yet another level of indirection - through
Arc<ArcSwap>
- remapping one of them affects all the others, as under the hood
it is done by replacing the Arc held by the ArcSwap, which is shared
by all cloned handles.
The optional String is just for debug purposes. Its purpose is described
in ExecutionProfile::into_handle_with_label.
Implementations§
source§impl ExecutionProfileHandle
impl ExecutionProfileHandle
sourcepub fn pointee_to_builder(&self) -> ExecutionProfileBuilder
pub fn pointee_to_builder(&self) -> ExecutionProfileBuilder
Creates a builder having all options set to the same as set in the ExecutionProfile pointed by this handle.
sourcepub fn to_profile(&self) -> ExecutionProfile
pub fn to_profile(&self) -> ExecutionProfile
Returns execution profile pointed by this handle.
sourcepub fn map_to_another_profile(&mut self, profile: ExecutionProfile)
pub fn map_to_another_profile(&mut self, profile: ExecutionProfile)
Makes the handle point to a new execution profile. All entities (queries/Session) holding this handle will reflect the change.
Trait Implementations§
source§impl Clone for ExecutionProfileHandle
impl Clone for ExecutionProfileHandle
source§fn clone(&self) -> ExecutionProfileHandle
fn clone(&self) -> ExecutionProfileHandle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ExecutionProfileHandle
impl !RefUnwindSafe for ExecutionProfileHandle
impl Send for ExecutionProfileHandle
impl Sync for ExecutionProfileHandle
impl Unpin for ExecutionProfileHandle
impl !UnwindSafe for ExecutionProfileHandle
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
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>
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 more