Skip to main content

FacetProbe

Struct FacetProbe 

Source
pub struct FacetProbe<'mem, 'facet> { /* private fields */ }
Expand description

The container that stores a MaybeMut of the type T that should be shown in the Ui

Implementations§

Source§

impl<'mem, 'facet> FacetProbe<'mem, 'facet>

Source

pub fn readonly(self, readonly: bool) -> Self

Source

pub fn expand_all(self, expand_all: bool) -> Self

Source

pub fn with_header(self, label: impl Into<WidgetText>) -> Self

Source

pub fn with_id_source(self, id_source: impl Hash) -> Self

Set a stable egui id source for this probe.

Use this when the probe can move in the UI hierarchy (e.g. draggable tabs), so collapse/expand state remains stable.

Source

pub unsafe fn force_reborrow(self) -> Self

§Safety

If used, there is a high chance what you do is unsound.

If you use this, you will have to manually ensure your variances are okay for use with reborrowing. Normally, this is determined by facet but there may be cases where a type does not implement Facet or has opaque parts that would (if used with facet) be ok.

Source

pub fn new_peek(value: Peek<'mem, 'facet>) -> Self

Source

pub fn new_poke(value: Poke<'mem, 'facet>) -> Self

Source

pub fn new<T>(value: impl Into<MaybeMutT<'mem, T>>) -> Self
where T: Facet<'facet> + 'mem,

Source

pub fn show<'lock>(self, ui: &mut Ui) -> Response
where 'mem: 'lock,

Methods from Deref<Target = MaybeMut<'mem, 'facet>>§

Source

pub fn as_peek(&'mem self) -> Peek<'mem, 'facet>

Returns a readonly/immutable version of the inner type

Source

pub fn shape(&self) -> &'static Shape

Returns the Shape of the underlying type

The Shape is the same for Mut and Not

Trait Implementations§

Source§

impl<'mem, 'facet> Deref for FacetProbe<'mem, 'facet>

Source§

type Target = MaybeMut<'mem, 'facet>

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<'mem, 'facet> DerefMut for FacetProbe<'mem, 'facet>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'mem, 'facet> Freeze for FacetProbe<'mem, 'facet>

§

impl<'mem, 'facet> RefUnwindSafe for FacetProbe<'mem, 'facet>

§

impl<'mem, 'facet> !Send for FacetProbe<'mem, 'facet>

§

impl<'mem, 'facet> !Sync for FacetProbe<'mem, 'facet>

§

impl<'mem, 'facet> Unpin for FacetProbe<'mem, 'facet>

§

impl<'mem, 'facet> UnsafeUnpin for FacetProbe<'mem, 'facet>

§

impl<'mem, 'facet> !UnwindSafe for FacetProbe<'mem, 'facet>

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> 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(value: T, _simd: S) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

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

Source§

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>,

Source§

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.