pub struct EngineConnection { /* private fields */ }
Implementations§
Source§impl EngineConnection
impl EngineConnection
pub async fn new() -> Result<EngineConnection>
Trait Implementations§
Source§impl Clone for EngineConnection
impl Clone for EngineConnection
Source§fn clone(&self) -> EngineConnection
fn clone(&self) -> EngineConnection
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EngineConnection
impl Debug for EngineConnection
Source§impl EngineManager for EngineConnection
impl EngineManager for EngineConnection
Source§fn batch(&self) -> Arc<RwLock<Vec<(WebSocketRequest, SourceRange)>>>
fn batch(&self) -> Arc<RwLock<Vec<(WebSocketRequest, SourceRange)>>>
Get the batch of commands to be sent to the engine.
Source§fn batch_end(
&self,
) -> Arc<RwLock<IndexMap<Uuid, (WebSocketRequest, SourceRange)>>>
fn batch_end( &self, ) -> Arc<RwLock<IndexMap<Uuid, (WebSocketRequest, SourceRange)>>>
Get the batch of end commands to be sent to the engine.
Source§fn responses(&self) -> Arc<RwLock<IndexMap<Uuid, WebSocketResponse>>>
fn responses(&self) -> Arc<RwLock<IndexMap<Uuid, WebSocketResponse>>>
Get the command responses from the engine.
fn stats(&self) -> &EngineStats
Source§fn ids_of_async_commands(&self) -> Arc<RwLock<IndexMap<Uuid, SourceRange>>>
fn ids_of_async_commands(&self) -> Arc<RwLock<IndexMap<Uuid, SourceRange>>>
Get the ids of the async commands we are waiting for.
Source§fn async_tasks(&self) -> AsyncTasks
fn async_tasks(&self) -> AsyncTasks
Get the async tasks we are waiting for.
Source§fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>>
fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>>
Get the default planes.
Source§fn clear_scene_post_hook<'life0, 'life1, 'async_trait>(
&'life0 self,
_id_generator: &'life1 mut IdGenerator,
_source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_scene_post_hook<'life0, 'life1, 'async_trait>(
&'life0 self,
_id_generator: &'life1 mut IdGenerator,
_source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Helpers to be called after clearing a scene.
(These really only apply to wasm for now).
Source§fn get_debug<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<OkWebSocketResponseData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_debug<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<OkWebSocketResponseData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get any debug information (if requested)
Source§fn fetch_debug<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_debug<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch debug information from the peer.
Source§fn inner_fire_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: WebSocketRequest,
id_to_source_range: HashMap<Uuid, SourceRange>,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn inner_fire_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: WebSocketRequest,
id_to_source_range: HashMap<Uuid, SourceRange>,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a modeling command and do not wait for the response message.
Source§fn inner_send_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
_source_range: SourceRange,
cmd: WebSocketRequest,
_id_to_source_range: HashMap<Uuid, SourceRange>,
) -> Pin<Box<dyn Future<Output = Result<WebSocketResponse, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn inner_send_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
_source_range: SourceRange,
cmd: WebSocketRequest,
_id_to_source_range: HashMap<Uuid, SourceRange>,
) -> Pin<Box<dyn Future<Output = Result<WebSocketResponse, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a modeling command and wait for the response message.
Source§fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the engine connection and wait for it to finish.
Source§fn take_batch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(WebSocketRequest, SourceRange)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn take_batch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(WebSocketRequest, SourceRange)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Take the batch of commands that have accumulated so far and clear them.
Source§fn take_batch_end<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexMap<Uuid, (WebSocketRequest, SourceRange)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn take_batch_end<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexMap<Uuid, (WebSocketRequest, SourceRange)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Take the batch of end commands that have accumulated so far and clear them.
Source§fn take_ids_of_async_commands<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexMap<Uuid, SourceRange>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn take_ids_of_async_commands<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexMap<Uuid, SourceRange>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Take the ids of async commands that have accumulated so far and clear them.
Source§fn take_responses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexMap<Uuid, WebSocketResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn take_responses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexMap<Uuid, WebSocketResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Take the responses that have accumulated so far and clear them.
Source§fn default_planes<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn default_planes<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the default planes, creating them if they don’t exist.
fn clear_queues<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_scene<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn ensure_async_command_completed<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: Option<SourceRange>,
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ensure_async_command_completed<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: Option<SourceRange>,
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ensure a specific async command has been completed.
Source§fn ensure_async_commands_completed<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ensure_async_commands_completed<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ensure ALL async commands have been completed.
Source§fn set_edge_visibility<'life0, 'life1, 'async_trait>(
&'life0 self,
visible: bool,
source_range: SourceRange,
id_generator: &'life1 mut IdGenerator,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_edge_visibility<'life0, 'life1, 'async_trait>(
&'life0 self,
visible: bool,
source_range: SourceRange,
id_generator: &'life1 mut IdGenerator,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set the visibility of edges.
Source§fn reapply_settings<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
settings: &'life1 ExecutorSettings,
source_range: SourceRange,
id_generator: &'life2 mut IdGenerator,
grid_scale_unit: GridScaleBehavior,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reapply_settings<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
settings: &'life1 ExecutorSettings,
source_range: SourceRange,
id_generator: &'life2 mut IdGenerator,
grid_scale_unit: GridScaleBehavior,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Re-run the command to apply the settings.
fn batch_modeling_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn batch_modeling_cmds<'life0, 'life1, 'async_trait>(
&'life0 self,
source_range: SourceRange,
cmds: &'life1 [ModelingCmdReq],
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn batch_end_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn batch_end_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add a command to the batch that needs to be executed at the very end.
This for stuff like fillets or chamfers where if we execute too soon the
engine will eat the ID and we can’t reference it for other commands.
Source§fn send_modeling_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_modeling_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send the modeling cmd and wait for the response.
Source§fn async_modeling_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn async_modeling_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send the modeling cmd async and don’t wait for the response.
Add it to our list of async commands.
Source§fn run_batch<'life0, 'async_trait>(
&'life0 self,
orig_requests: Vec<(WebSocketRequest, SourceRange)>,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_batch<'life0, 'async_trait>(
&'life0 self,
orig_requests: Vec<(WebSocketRequest, SourceRange)>,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run the batch for the specific commands.
Source§fn flush_batch<'life0, 'async_trait>(
&'life0 self,
batch_end: bool,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush_batch<'life0, 'async_trait>(
&'life0 self,
batch_end: bool,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Force flush the batch queue.
fn make_default_plane<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plane_id: Uuid,
info: &'life1 PlaneInfo,
color: Option<Color>,
source_range: SourceRange,
id_generator: &'life2 mut IdGenerator,
) -> Pin<Box<dyn Future<Output = Result<Uuid, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn new_default_planes<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn parse_websocket_response( &self, response: WebSocketResponse, source_range: SourceRange, ) -> Result<OkWebSocketResponseData, KclError>
fn parse_batch_responses( &self, id: Uuid, id_to_source_range: HashMap<Uuid, SourceRange>, responses: HashMap<Uuid, BatchResponse>, ) -> Result<OkWebSocketResponseData, KclError>
fn modify_grid<'life0, 'life1, 'async_trait>(
&'life0 self,
hidden: bool,
grid_scale_behavior: GridScaleBehavior,
source_range: SourceRange,
id_generator: &'life1 mut IdGenerator,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_session_data<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ModelingSessionData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_session_data<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ModelingSessionData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get session data, if it has been received.
Returns None if the server never sent it.
Auto Trait Implementations§
impl !Freeze for EngineConnection
impl !RefUnwindSafe for EngineConnection
impl Send for EngineConnection
impl Sync for EngineConnection
impl Unpin for EngineConnection
impl !UnwindSafe for EngineConnection
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
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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.