Struct rerun_bindings::python_bridge::PyRecordingStream

source ·
struct PyRecordingStream(RecordingStream);

Tuple Fields§

§0: RecordingStream

Implementations§

source§

impl PyRecordingStream

source

fn is_forked_child(&self) -> bool

Determine if this stream is operating in the context of a forked child process.

This means the stream was created in the parent process. It now exists in the child process by way of fork, but it is effectively a zombie since its batcher and sink threads would not have been copied.

Calling operations such as flush or set_sink will result in an error.

Methods from Deref<Target = RecordingStream>§

pub fn clone_weak(&self) -> RecordingStream

Clones the [RecordingStream] without incrementing the refcount.

Useful e.g. if you want to make sure that a detached thread won’t prevent the [RecordingStream] from flushing during shutdown.

pub fn log<AS>( &self, ent_path: impl Into<EntityPath>, as_components: &AS, ) -> Result<(), RecordingStreamError>
where AS: AsComponents + ?Sized,

Log data to Rerun.

This is the main entry point for logging data to rerun. It can be used to log anything that implements the AsComponents, such as any archetype or individual component.

The data will be timestamped automatically based on the [RecordingStream]’s internal clock. See [RecordingStream::set_time_sequence] etc for more information.

The entity path can either be a string (with special characters escaped, split on unescaped slashes) or an EntityPath constructed with crate::entity_path. See https://www.rerun.io/docs/concepts/entity-path for more on entity paths.

See also: [Self::log_static] for logging static data.

Internally, the stream will automatically micro-batch multiple log calls to optimize transport. See SDK Micro Batching for more information.

§Example:
rec.log(
    "my/points",
    &rerun::Points3D::new([(0.0, 0.0, 0.0), (1.0, 1.0, 1.0)]),
)?;

pub fn send_columns( &self, ent_path: impl Into<EntityPath>, indexes: impl IntoIterator<Item = TimeColumn>, columns: impl IntoIterator<Item = SerializedComponentColumn>, ) -> Result<(), RecordingStreamError>

Lower-level logging API to provide data spanning multiple timepoints.

Unlike the regular log API, which is row-oriented, this API lets you submit the data in a columnar form. The lengths of all of the TimeColumn and the component columns must match. All data that occurs at the same index across the different time and components arrays will act as a single logical row.

Note that this API ignores any stateful time set on the log stream via the [Self::set_timepoint]/[Self::set_time_nanos]/etc. APIs. Furthermore, this will not inject the default timelines log_tick and log_time timeline columns.

pub fn log_static<AS>( &self, ent_path: impl Into<EntityPath>, as_components: &AS, ) -> Result<(), RecordingStreamError>
where AS: AsComponents + ?Sized,

Log data to Rerun.

It can be used to log anything that implements the AsComponents, such as any archetype or individual component.

Static data has no time associated with it, exists on all timelines, and unconditionally shadows any temporal data of the same type. All timestamp data associated with this message will be dropped right before sending it to Rerun.

This is most often used for rerun::ViewCoordinates and rerun::AnnotationContext.

Internally, the stream will automatically micro-batch multiple log calls to optimize transport. See SDK Micro Batching for more information.

See also [Self::log].

pub fn log_with_static<AS>( &self, ent_path: impl Into<EntityPath>, static_: bool, as_components: &AS, ) -> Result<(), RecordingStreamError>
where AS: AsComponents + ?Sized,

Logs the contents of a component bundle into Rerun.

If static_ is set to true, all timestamp data associated with this message will be dropped right before sending it to Rerun. Static data has no time associated with it, exists on all timelines, and unconditionally shadows any temporal data of the same type.

Otherwise, the data will be timestamped automatically based on the [RecordingStream]’s internal clock. See RecordingStream::set_time_* family of methods for more information.

The entity path can either be a string (with special characters escaped, split on unescaped slashes) or an EntityPath constructed with crate::entity_path. See https://www.rerun.io/docs/concepts/entity-path for more on entity paths.

Internally, the stream will automatically micro-batch multiple log calls to optimize transport. See SDK Micro Batching for more information.

pub fn log_serialized_batches( &self, ent_path: impl Into<EntityPath>, static_: bool, comp_batches: impl IntoIterator<Item = SerializedComponentBatch>, ) -> Result<(), RecordingStreamError>

Logs a set of SerializedComponentBatches into Rerun.

If static_ is set to true, all timestamp data associated with this message will be dropped right before sending it to Rerun. Static data has no time associated with it, exists on all timelines, and unconditionally shadows any temporal data of the same type.

Otherwise, the data will be timestamped automatically based on the [RecordingStream]’s internal clock. See RecordingStream::set_time_* family of methods for more information.

The number of instances will be determined by the longest batch in the bundle.

The entity path can either be a string (with special characters escaped, split on unescaped slashes) or an EntityPath constructed with crate::entity_path. See https://www.rerun.io/docs/concepts/entity-path for more on entity paths.

Internally, the stream will automatically micro-batch multiple log calls to optimize transport. See SDK Micro Batching for more information.

pub fn log_file_from_path( &self, filepath: impl AsRef<Path>, entity_path_prefix: Option<EntityPath>, static_: bool, ) -> Result<(), RecordingStreamError>

Logs the file at the given path using all re_data_loader::DataLoaders available.

A single path might be handled by more than one loader.

This method blocks until either at least one re_data_loader::DataLoader starts streaming data in or all of them fail.

See https://www.rerun.io/docs/reference/data-loaders/overview for more information.

pub fn log_file_from_contents( &self, filepath: impl AsRef<Path>, contents: Cow<'_, [u8]>, entity_path_prefix: Option<EntityPath>, static_: bool, ) -> Result<(), RecordingStreamError>

Logs the given contents using all re_data_loader::DataLoaders available.

A single path might be handled by more than one loader.

This method blocks until either at least one re_data_loader::DataLoader starts streaming data in or all of them fail.

See https://www.rerun.io/docs/reference/data-loaders/overview for more information.

pub fn is_enabled(&self) -> bool

Check if logging is enabled on this RecordingStream.

If not, all recording calls will be ignored.

pub fn store_info(&self) -> Option<StoreInfo>

The StoreInfo associated with this RecordingStream.

pub fn is_forked_child(&self) -> bool

Determine whether a fork has happened since creating this RecordingStream. In general, this means our batcher/sink threads are gone and all data logged since the fork has been dropped.

It is essential that [crate::cleanup_if_forked_child] be called after forking the process. SDK-implementations should do this during their initialization phase.

pub fn record_msg(&self, msg: LogMsg)

Records an arbitrary LogMsg.

pub fn record_row( &self, entity_path: EntityPath, row: PendingRow, inject_time: bool, )

Records a single PendingRow.

If inject_time is set to true, the row’s timestamp data will be overridden using the [RecordingStream]’s internal clock.

Internally, incoming PendingRows are automatically coalesced into larger Chunks to optimize for transport.

pub fn log_chunk(&self, chunk: Chunk)

Logs a single Chunk.

Will inject log_tick and log_time timeline columns into the chunk. If you don’t want to inject these, use [Self::send_chunk] instead.

pub fn send_chunk(&self, chunk: Chunk)

Records a single Chunk.

This will not inject log_tick and log_time timeline columns into the chunk, for that use [Self::log_chunk].

pub fn set_sink(&self, sink: Box<dyn LogSink>)

Swaps the underlying sink for a new one.

This guarantees that:

  1. all pending rows and chunks are batched, collected and sent down the current sink,
  2. the current sink is flushed if it has pending data in its buffers,
  3. the current sink’s backlog, if there’s any, is forwarded to the new sink.

When this function returns, the calling thread is guaranteed that all future record calls will end up in the new sink.

§Data loss

If the current sink is in a broken state (e.g. a TCP sink with a broken connection that cannot be repaired), all pending data in its buffers will be dropped.

pub fn flush_async(&self)

Initiates a flush of the pipeline and returns immediately.

This does not wait for the flush to propagate (see [Self::flush_blocking]). See [RecordingStream] docs for ordering semantics and multithreading guarantees.

pub fn flush_blocking(&self)

Initiates a flush the batching pipeline and waits for it to propagate.

See [RecordingStream] docs for ordering semantics and multithreading guarantees.

pub fn connect(&self)

Swaps the underlying sink for a [crate::log_sink::TcpSink] sink pre-configured to use the specified address.

See also [Self::connect_opts] if you wish to configure the TCP connection.

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn connect_opts(&self, addr: SocketAddr, flush_timeout: Option<Duration>)

Swaps the underlying sink for a [crate::log_sink::TcpSink] sink pre-configured to use the specified address.

flush_timeout is the minimum time the [TcpSink][crate::log_sink::TcpSink] will wait during a flush before potentially dropping data. Note: Passing None here can cause a call to flush to block indefinitely if a connection cannot be established.

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn spawn(&self) -> Result<(), RecordingStreamError>

Spawns a new Rerun Viewer process from an executable available in PATH, then swaps the underlying sink for a [crate::log_sink::TcpSink] sink pre-configured to send data to that new process.

If a Rerun Viewer is already listening on this TCP port, the stream will be redirected to that viewer instead of starting a new one.

See also [Self::spawn_opts] if you wish to configure the behavior of thew Rerun process as well as the underlying TCP connection.

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn spawn_opts( &self, opts: &SpawnOptions, flush_timeout: Option<Duration>, ) -> Result<(), RecordingStreamError>

Spawns a new Rerun Viewer process from an executable available in PATH, then swaps the underlying sink for a [crate::log_sink::TcpSink] sink pre-configured to send data to that new process.

If a Rerun Viewer is already listening on this TCP port, the stream will be redirected to that viewer instead of starting a new one.

The behavior of the spawned Viewer can be configured via opts. If you’re fine with the default behavior, refer to the simpler [Self::spawn].

flush_timeout is the minimum time the [TcpSink][crate::log_sink::TcpSink] will wait during a flush before potentially dropping data. Note: Passing None here can cause a call to flush to block indefinitely if a connection cannot be established.

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn memory(&self) -> MemorySinkStorage

Swaps the underlying sink for a [crate::sink::MemorySink] sink and returns the associated [MemorySinkStorage].

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn binary_stream( &self, ) -> Result<BinaryStreamStorage, BinaryStreamSinkError>

Swaps the underlying sink for a [crate::sink::BinaryStreamSink] sink and returns the associated [BinaryStreamStorage].

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn save(&self, path: impl Into<PathBuf>) -> Result<(), FileSinkError>

Swaps the underlying sink for a crate::sink::FileSink at the specified path.

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn save_opts(&self, path: impl Into<PathBuf>) -> Result<(), FileSinkError>

Swaps the underlying sink for a crate::sink::FileSink at the specified path.

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

If a blueprint was provided, it will be stored first in the file. Blueprints are currently an experimental part of the Rust SDK.

pub fn stdout(&self) -> Result<(), FileSinkError>

Swaps the underlying sink for a crate::sink::FileSink pointed at stdout.

If there isn’t any listener at the other end of the pipe, the [RecordingStream] will default back to buffered mode, in order not to break the user’s terminal.

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn stdout_opts(&self) -> Result<(), FileSinkError>

Swaps the underlying sink for a crate::sink::FileSink pointed at stdout.

If there isn’t any listener at the other end of the pipe, the [RecordingStream] will default back to buffered mode, in order not to break the user’s terminal.

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

If a blueprint was provided, it will be stored first in the file. Blueprints are currently an experimental part of the Rust SDK.

pub fn disconnect(&self)

Swaps the underlying sink for a [crate::sink::BufferedSink].

This is a convenience wrapper for [Self::set_sink] that upholds the same guarantees in terms of data durability and ordering. See [Self::set_sink] for more information.

pub fn send_blueprint( &self, blueprint: Vec<LogMsg>, activation_cmd: BlueprintActivationCommand, )

Send a blueprint through this recording stream

pub fn now(&self) -> TimePoint

Returns the current time of the recording on the current thread.

pub fn set_timepoint(&self, timepoint: impl Into<TimePoint>)

Set the current time of the recording, for the current calling thread.

Used for all subsequent logging performed from this same thread, until the next call to one of the time setting methods.

There is no requirement of monotonicity. You can move the time backwards if you like.

See also:

  • [Self::set_time_sequence]
  • [Self::set_time_seconds]
  • [Self::set_time_nanos]
  • [Self::disable_timeline]
  • [Self::reset_time]

pub fn set_time_sequence( &self, timeline: impl Into<TimelineName>, sequence: impl Into<i64>, )

Set the current time of the recording, for the current calling thread.

Used for all subsequent logging performed from this same thread, until the next call to one of the time setting methods.

For example: rec.set_time_sequence("frame_nr", frame_nr). You can remove a timeline again using rec.disable_timeline("frame_nr").

There is no requirement of monotonicity. You can move the time backwards if you like.

See also:

  • [Self::set_timepoint]
  • [Self::set_time_seconds]
  • [Self::set_time_nanos]
  • [Self::disable_timeline]
  • [Self::reset_time]

pub fn set_time_seconds( &self, timeline: impl Into<TimelineName>, seconds: impl Into<f64>, )

Set the current time of the recording, for the current calling thread.

Used for all subsequent logging performed from this same thread, until the next call to one of the time setting methods.

For example: rec.set_time_seconds("sim_time", sim_time_secs). You can remove a timeline again using rec.disable_timeline("sim_time").

There is no requirement of monotonicity. You can move the time backwards if you like.

See also:

  • [Self::set_timepoint]
  • [Self::set_time_sequence]
  • [Self::set_time_nanos]
  • [Self::disable_timeline]
  • [Self::reset_time]

pub fn set_time_nanos( &self, timeline: impl Into<TimelineName>, ns: impl Into<i64>, )

Set the current time of the recording, for the current calling thread.

Used for all subsequent logging performed from this same thread, until the next call to one of the time setting methods.

For example: rec.set_time_nanos("sim_time", sim_time_nanos). You can remove a timeline again using rec.disable_timeline("sim_time").

There is no requirement of monotonicity. You can move the time backwards if you like.

See also:

  • [Self::set_timepoint]
  • [Self::set_time_sequence]
  • [Self::set_time_seconds]
  • [Self::disable_timeline]
  • [Self::reset_time]

pub fn disable_timeline(&self, timeline: impl Into<TimelineName>)

Clears out the current time of the recording for the specified timeline, for the current calling thread.

For example: rec.disable_timeline("frame"), rec.disable_timeline("sim_time").

See also:

  • [Self::set_timepoint]
  • [Self::set_time_sequence]
  • [Self::set_time_seconds]
  • [Self::set_time_nanos]
  • [Self::reset_time]

pub fn reset_time(&self)

Clears out the current time of the recording, for the current calling thread.

Used for all subsequent logging performed from this same thread, until the next call to one of the time setting methods.

For example: rec.reset_time().

See also:

  • [Self::set_timepoint]
  • [Self::set_time_sequence]
  • [Self::set_time_seconds]
  • [Self::set_time_nanos]
  • [Self::disable_timeline]

Trait Implementations§

source§

impl Clone for PyRecordingStream

source§

fn clone(&self) -> PyRecordingStream

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Deref for PyRecordingStream

§

type Target = RecordingStream

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl IntoPy<Py<PyAny>> for PyRecordingStream

source§

fn into_py(self, py: Python<'_>) -> PyObject

Performs the conversion.
source§

impl PyClass for PyRecordingStream

§

type Frozen = True

Whether the pyclass is frozen. Read more
source§

impl PyClassImpl for PyRecordingStream

source§

const IS_BASETYPE: bool = false

#[pyclass(subclass)]
source§

const IS_SUBCLASS: bool = false

#[pyclass(extends=…)]
source§

const IS_MAPPING: bool = false

#[pyclass(mapping)]
source§

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
§

type BaseType = PyAny

Base class
§

type ThreadChecker = SendablePyClass<PyRecordingStream>

This handles following two situations: Read more
§

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild

Immutable or mutable
§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
§

type BaseNativeType = PyAny

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict.
source§

fn items_iter() -> PyClassItemsIter

source§

fn doc(py: Python<'_>) -> PyResult<&'static CStr>

Rendered class doc
source§

fn lazy_type_object() -> &'static LazyTypeObject<Self>

§

fn dict_offset() -> Option<isize>

§

fn weaklist_offset() -> Option<isize>

source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyRecordingStream

§

type Holder = Option<PyRef<'py, PyRecordingStream>>

source§

fn extract( obj: &'a Bound<'py, PyAny>, holder: &'a mut Self::Holder, ) -> PyResult<Self>

source§

impl PyMethods<PyRecordingStream> for PyClassImplCollector<PyRecordingStream>

source§

fn py_methods(self) -> &'static PyClassItems

source§

impl PyTypeInfo for PyRecordingStream

source§

const NAME: &'static str = "PyRecordingStream"

Class name.
source§

const MODULE: Option<&'static str> = ::core::option::Option::None

Module name, if any.
source§

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
§

fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>

Returns the safe abstraction over the type object.
§

fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type or a subclass of this type.
§

fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type.
source§

impl DerefToPyAny for PyRecordingStream

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DynClone for T
where T: Clone,

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromPyObject<'_> for T
where T: PyClass + Clone,

§

fn extract_bound(obj: &Bound<'_, PyAny>) -> Result<T, PyErr>

Extracts Self from the bound smart pointer obj. Read more
§

impl<'py, T> FromPyObjectBound<'_, 'py> for T
where T: FromPyObject<'py>,

§

fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>

Extracts Self from the bound smart pointer obj. Read more
§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

source§

fn lossy_into(self) -> Dst

Performs the conversion.
source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PyErrArguments for T
where T: IntoPy<Py<PyAny>> + Send + Sync,

§

fn arguments(self, py: Python<'_>) -> Py<PyAny>

Arguments for exception
§

impl<T> PyTypeCheck for T
where T: PyTypeInfo,

§

const NAME: &'static str = <T as PyTypeInfo>::NAME

Name of self. This is used in error messages, for example.
§

fn type_check(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of Self, which may include a subtype. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> To for T
where T: ?Sized,

§

fn to<T>(self) -> T
where Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T

§

impl<T> Ungil for T
where T: Send,