Skip to main content

StrykeValue

Struct StrykeValue 

Source
pub struct StrykeValue(/* private fields */);
Expand description

NaN-boxed value: one u64 (immediates, raw float bits, or tagged heap pointer).

Implementations§

Source§

impl StrykeValue

Source

pub fn dup_stack(&self) -> Self

Stack duplicate (Op::Dup): share the outer heap Arc for arrays/hashes (COW on write), matching Perl temporaries; other heap payloads keep Clone semantics.

Source

pub fn shallow_clone(&self) -> Self

Refcount-only clone: Arc::clone the heap pointer (no deep copy of the payload).

Use this when producing a second handle to the same value that the caller will read-only or consume via Self::into_string / Arc::try_unwrap-style uniqueness checks. Cheap O(1) regardless of the payload size.

The default Clone impl deep-copies String/Array/Hash payloads to preserve “clone = independent writable value” semantics for legacy callers; in hot RMW paths (.=, slot stash-and-return) that deep copy is O(N) and must be avoided — use this instead.

Source§

impl StrykeValue

Source

pub const UNDEF: StrykeValue

UNDEF constant.

Source

pub fn is_integer_like(&self) -> bool

typed : Int — inline i32 or heap i64.

Source

pub fn is_float_like(&self) -> bool

Raw f64 bits or heap boxed float (NaN/Inf).

Source

pub fn is_string_like(&self) -> bool

Heap UTF-8 string only.

Source

pub fn integer(n: i64) -> Self

integer — see implementation.

Source

pub fn bigint(n: BigInt) -> Self

Wrap a BigInt. If it fits in i64, demotes to a regular integer so downstream consumers don’t have to special-case BigInt for small values.

Source

pub fn as_bigint(&self) -> Option<Arc<BigInt>>

Returns the inner BigInt as Arc (zero-copy) when this value is a boxed BigInt; None otherwise. Use Self::to_bigint to coerce from i64/f64/strings.

Source

pub fn to_bigint(&self) -> BigInt

Coerce any numeric value into a BigInt. Floats truncate. Used by arithmetic promotion paths under --compat when one side overflowed.

Source

pub fn float(f: f64) -> Self

float — see implementation.

Source

pub fn string(s: String) -> Self

string — see implementation.

Source

pub fn bytes(b: Arc<Vec<u8>>) -> Self

bytes — see implementation.

Source

pub fn array(v: Vec<StrykeValue>) -> Self

array — see implementation.

Source

pub fn iterator(it: Arc<dyn StrykeIterator>) -> Self

Wrap a lazy iterator as a StrykeValue.

Source

pub fn is_iterator(&self) -> bool

True when this value is a lazy iterator.

Source

pub fn into_iterator(&self) -> Arc<dyn StrykeIterator>

Extract the iterator Arc (panics if not an iterator).

Source

pub fn hash(h: IndexMap<String, StrykeValue>) -> Self

hash — see implementation.

Source

pub fn array_ref(a: Arc<RwLock<Vec<StrykeValue>>>) -> Self

array_ref — see implementation.

Source

pub fn hash_ref(h: Arc<RwLock<IndexMap<String, StrykeValue>>>) -> Self

hash_ref — see implementation.

Source

pub fn scalar_ref(r: Arc<RwLock<StrykeValue>>) -> Self

scalar_ref — see implementation.

Source

pub fn capture_cell(r: Arc<RwLock<StrykeValue>>) -> Self

capture_cell — see implementation.

Source

pub fn scalar_binding_ref(name: String) -> Self

scalar_binding_ref — see implementation.

Source

pub fn array_binding_ref(name: String) -> Self

array_binding_ref — see implementation.

Source

pub fn hash_binding_ref(name: String) -> Self

hash_binding_ref — see implementation.

Source

pub fn code_ref(c: Arc<StrykeSub>) -> Self

code_ref — see implementation.

Source

pub fn as_code_ref(&self) -> Option<Arc<StrykeSub>>

as_code_ref — see implementation.

Source

pub fn as_regex(&self) -> Option<Arc<PerlCompiledRegex>>

as_regex — see implementation.

Source

pub fn as_blessed_ref(&self) -> Option<Arc<BlessedRef>>

as_blessed_ref — see implementation.

Source

pub fn hash_get(&self, key: &str) -> Option<StrykeValue>

Hash lookup when this value is a plain HeapObject::Hash (not a ref).

Source

pub fn is_undef(&self) -> bool

is_undef — see implementation.

Source

pub fn is_simple_scalar(&self) -> bool

True for simple scalar values (integer, float, string, undef, bytes) that should be wrapped in ScalarRef for closure variable sharing. Complex heap objects like refs, blessed objects, code refs, etc. should NOT be wrapped because they already share state via Arc and wrapping breaks type detection.

Source

pub fn as_integer(&self) -> Option<i64>

Immediate int32 or heap Integer (not float / string).

Source

pub fn as_float(&self) -> Option<f64>

as_float — see implementation.

Source

pub fn as_array_vec(&self) -> Option<Vec<StrykeValue>>

as_array_vec — see implementation.

Source

pub fn map_flatten_outputs(&self, peel_array_ref: bool) -> Vec<StrykeValue>

Expand a map / flat_map / pflat_map block result into list elements. Plain arrays expand; when peel_array_ref, a single ARRAY ref is dereferenced one level (stryke flat_map / pflat_map; stock map uses peel_array_ref == false).

Source

pub fn as_hash_map(&self) -> Option<IndexMap<String, StrykeValue>>

as_hash_map — see implementation.

Source

pub fn as_bytes_arc(&self) -> Option<Arc<Vec<u8>>>

as_bytes_arc — see implementation.

Source

pub fn length_value(&self, utf8: bool) -> i64

length builtin semantics, factored out so the interpreter (BuiltinId::Length) and the fusevm JIT host helper (fusevm_bridge::stryke_str_len_op) compute an identical result: array element count, hash key count, raw-byte length, otherwise the stringified value’s character count (when the utf8 pragma is active) or byte length.

Source

pub fn ord_value(&self) -> i64

ord builtin: Unicode codepoint of the stringified value’s first char (0 if empty). Shared by the interpreter (BuiltinId::Ord) and the fusevm JIT host helper so both agree exactly.

Source

pub fn hex_value(&self) -> i64

hex builtin: parse the stringified value as hexadecimal (optional 0x/0X prefix), 0 on failure. Shared by the interpreter and the fusevm JIT helper.

Source

pub fn oct_value(&self) -> i64

oct builtin: parse the stringified value per Perl oct (0x/0X hex, 0b/0B binary, 0o/0O or bare-leading-zero octal), 0 on failure. Shared by the interpreter and the fusevm JIT helper.

Source

pub fn uc_value(&self) -> String

uc builtin: the stringified value upper-cased. Shared by the interpreter (BuiltinId::Uc) and the fusevm JIT host helper so both agree exactly.

Source

pub fn lc_value(&self) -> String

lc builtin: the stringified value lower-cased. Shared by the interpreter (BuiltinId::Lc) and the fusevm JIT host helper.

Source

pub fn ucfirst_value(&self) -> String

ucfirst builtin: the stringified value with only its first character upper-cased. Shared by the interpreter and the fusevm JIT helper.

Source

pub fn lcfirst_value(&self) -> String

lcfirst builtin: the stringified value with only its first character lower-cased. Shared by the interpreter and the fusevm JIT helper.

Source

pub fn chr_value(&self) -> String

chr builtin: the one-character string for this value’s integer codepoint (empty string for an invalid codepoint). Shared by the interpreter (BuiltinId::Chr) and the fusevm JIT host helper via chr_from_codepoint.

Source

pub fn fc_value(&self) -> String

fc builtin: the Unicode default case-fold of the stringified value (used for caseless comparison). Shared by the interpreter (BuiltinId::Fc) and the fusevm JIT host helper so both agree exactly.

Source

pub fn index_value(&self, sub: &StrykeValue) -> i64

index($s, $sub) builtin (2-arg form, no explicit position): the byte offset of the first occurrence of sub in self, or -1 if absent. Shared by the interpreter and the fusevm JIT host helper so both agree exactly. (The 3-arg form with an explicit start position is handled only by the interpreter.)

Source

pub fn rindex_value(&self, sub: &StrykeValue) -> i64

rindex($s, $sub) builtin (2-arg form, no explicit position): the byte offset of the last occurrence of sub in self, or -1 if absent. Shared by the interpreter and the fusevm JIT host helper.

Source

pub fn substr2_value(&self, off: i64) -> String

substr($s, $off) builtin (2-arg form, no length): the byte-offset suffix of self starting at off (negative off counts from the end). Mirrors the interpreter’s byte-based slicing exactly (a non-char-boundary start yields the empty string). Shared by the interpreter and the fusevm JIT host helper.

Source

pub fn repeat_value(&self, n: i64) -> String

$s x $n string-repeat operator: self stringified and repeated n times (n <= 0 yields the empty string). Shared by the interpreter (Op::StringRepeat) and the fusevm JIT host helper so both agree exactly.

Source

pub fn substr3_value(&self, off: i64, len: i64) -> String

substr($s, $off, $len) builtin (3-arg form): the byte-offset substring of self starting at off (negative counts from the end) for len bytes (a negative len stops that many bytes from the end). Mirrors the interpreter’s byte-based slicing exactly (a non-char-boundary range yields the empty string). Shared by the interpreter and the fusevm JIT host helper.

Source

pub fn as_async_task(&self) -> Option<Arc<StrykeAsyncTask>>

as_async_task — see implementation.

Source

pub fn as_generator(&self) -> Option<Arc<PerlGenerator>>

as_generator — see implementation.

Source

pub fn as_atomic_arc(&self) -> Option<Arc<Mutex<StrykeValue>>>

as_atomic_arc — see implementation.

Source

pub fn as_io_handle_name(&self) -> Option<String>

as_io_handle_name — see implementation.

Source

pub fn as_sqlite_conn(&self) -> Option<Arc<Mutex<Connection>>>

as_sqlite_conn — see implementation.

Source

pub fn as_struct_inst(&self) -> Option<Arc<StructInstance>>

as_struct_inst — see implementation.

Source

pub fn as_enum_inst(&self) -> Option<Arc<EnumInstance>>

as_enum_inst — see implementation.

Source

pub fn as_class_inst(&self) -> Option<Arc<ClassInstance>>

as_class_inst — see implementation.

Source

pub fn as_dataframe(&self) -> Option<Arc<Mutex<PerlDataFrame>>>

as_dataframe — see implementation.

Source

pub fn as_deque(&self) -> Option<Arc<Mutex<VecDeque<StrykeValue>>>>

as_deque — see implementation.

Source

pub fn as_heap_pq(&self) -> Option<Arc<Mutex<PerlHeap>>>

as_heap_pq — see implementation.

Source

pub fn as_pipeline(&self) -> Option<Arc<Mutex<PipelineInner>>>

as_pipeline — see implementation.

Source

pub fn as_capture(&self) -> Option<Arc<CaptureResult>>

as_capture — see implementation.

Source

pub fn as_ppool(&self) -> Option<PerlPpool>

as_ppool — see implementation.

Source

pub fn as_remote_cluster(&self) -> Option<Arc<RemoteCluster>>

as_remote_cluster — see implementation.

Source

pub fn as_barrier(&self) -> Option<PerlBarrier>

as_barrier — see implementation.

Source

pub fn as_channel_tx(&self) -> Option<Arc<Sender<StrykeValue>>>

as_channel_tx — see implementation.

Source

pub fn as_channel_rx(&self) -> Option<Arc<Receiver<StrykeValue>>>

as_channel_rx — see implementation.

Source

pub fn as_scalar_ref(&self) -> Option<Arc<RwLock<StrykeValue>>>

as_scalar_ref — see implementation.

Source

pub fn as_capture_cell(&self) -> Option<Arc<RwLock<StrykeValue>>>

Returns the inner Arc if this is a [HeapObject::CaptureCell].

Source

pub fn as_scalar_binding_name(&self) -> Option<String>

Name of the scalar slot for [HeapObject::ScalarBindingRef], if any.

Source

pub fn as_array_binding_name(&self) -> Option<String>

Stash-qualified array name for [HeapObject::ArrayBindingRef], if any.

Source

pub fn as_hash_binding_name(&self) -> Option<String>

Hash name for [HeapObject::HashBindingRef], if any.

Source

pub fn as_array_ref(&self) -> Option<Arc<RwLock<Vec<StrykeValue>>>>

as_array_ref — see implementation.

Source

pub fn as_hash_ref(&self) -> Option<Arc<RwLock<IndexMap<String, StrykeValue>>>>

as_hash_ref — see implementation.

Source

pub fn is_mysync_deque_or_heap(&self) -> bool

mysync: deque / priority heap — already Arc<Mutex<…>>.

Source

pub fn regex( rx: Arc<PerlCompiledRegex>, pattern_src: String, flags: String, ) -> Self

regex — see implementation.

Source

pub fn regex_src_and_flags(&self) -> Option<(String, String)>

Pattern and flag string stored with a compiled regex (for =~ / [Op::RegexMatchDyn]).

Source

pub fn blessed(b: Arc<BlessedRef>) -> Self

blessed — see implementation.

Source

pub fn io_handle(name: String) -> Self

io_handle — see implementation.

Source

pub fn atomic(a: Arc<Mutex<StrykeValue>>) -> Self

atomic — see implementation.

Source

pub fn set(s: Arc<PerlSet>) -> Self

set — see implementation.

Source

pub fn channel_tx(tx: Arc<Sender<StrykeValue>>) -> Self

channel_tx — see implementation.

Source

pub fn channel_rx(rx: Arc<Receiver<StrykeValue>>) -> Self

channel_rx — see implementation.

Source

pub fn async_task(t: Arc<StrykeAsyncTask>) -> Self

async_task — see implementation.

Source

pub fn generator(g: Arc<PerlGenerator>) -> Self

generator — see implementation.

Source

pub fn deque(d: Arc<Mutex<VecDeque<StrykeValue>>>) -> Self

deque — see implementation.

Source

pub fn heap(h: Arc<Mutex<PerlHeap>>) -> Self

heap — see implementation.

Source

pub fn mutex() -> Self

Construct a fresh, unlocked [HeapObject::Mutex].

Source

pub fn semaphore(n: i64) -> Self

Construct a [HeapObject::Semaphore] with n permits (n is clamped to >= 0 by the caller — see builtins_sync::semaphore_new).

Source

pub fn as_mutex(&self) -> Option<Arc<MutexHandle>>

Borrow-the-inner-handle accessor for [HeapObject::Mutex] (returns the Arc so the handle outlives the temporary StrykeValue).

Source

pub fn as_semaphore(&self) -> Option<Arc<SemaphoreHandle>>

Borrow-the-inner-handle accessor for [HeapObject::Semaphore].

Source

pub fn bloom_filter(b: Arc<Mutex<BloomFilter>>) -> Self

bloom_filter — see implementation.

Source

pub fn as_bloom_filter(&self) -> Option<Arc<Mutex<BloomFilter>>>

as_bloom_filter — see implementation.

Source

pub fn hll_sketch(h: Arc<Mutex<HllSketch>>) -> Self

hll_sketch — see implementation.

Source

pub fn as_hll_sketch(&self) -> Option<Arc<Mutex<HllSketch>>>

as_hll_sketch — see implementation.

Source

pub fn cms_sketch(c: Arc<Mutex<CmsSketch>>) -> Self

cms_sketch — see implementation.

Source

pub fn as_cms_sketch(&self) -> Option<Arc<Mutex<CmsSketch>>>

as_cms_sketch — see implementation.

Source

pub fn topk_sketch(t: Arc<Mutex<TopKSketch>>) -> Self

topk_sketch — see implementation.

Source

pub fn as_topk_sketch(&self) -> Option<Arc<Mutex<TopKSketch>>>

as_topk_sketch — see implementation.

Source

pub fn tdigest_sketch(t: Arc<Mutex<TDigestSketch>>) -> Self

tdigest_sketch — see implementation.

Source

pub fn as_tdigest_sketch(&self) -> Option<Arc<Mutex<TDigestSketch>>>

as_tdigest_sketch — see implementation.

Source

pub fn roaring_bitmap(r: Arc<Mutex<RoaringBitmapSketch>>) -> Self

roaring_bitmap — see implementation.

Source

pub fn as_roaring_bitmap(&self) -> Option<Arc<Mutex<RoaringBitmapSketch>>>

as_roaring_bitmap — see implementation.

Source

pub fn rate_limiter(r: Arc<Mutex<RateLimiterSketch>>) -> Self

rate_limiter — see implementation.

Source

pub fn as_rate_limiter(&self) -> Option<Arc<Mutex<RateLimiterSketch>>>

as_rate_limiter — see implementation.

Source

pub fn hash_ring(r: Arc<Mutex<HashRingSketch>>) -> Self

hash_ring — see implementation.

Source

pub fn as_hash_ring(&self) -> Option<Arc<Mutex<HashRingSketch>>>

as_hash_ring — see implementation.

Source

pub fn simhash(s: Arc<Mutex<SimHashSketch>>) -> Self

simhash — see implementation.

Source

pub fn as_simhash(&self) -> Option<Arc<Mutex<SimHashSketch>>>

as_simhash — see implementation.

Source

pub fn minhash(m: Arc<Mutex<MinHashSketch>>) -> Self

minhash — see implementation.

Source

pub fn as_minhash(&self) -> Option<Arc<Mutex<MinHashSketch>>>

as_minhash — see implementation.

Source

pub fn interval_tree(t: Arc<Mutex<IntervalTreeSketch>>) -> Self

interval_tree — see implementation.

Source

pub fn as_interval_tree(&self) -> Option<Arc<Mutex<IntervalTreeSketch>>>

as_interval_tree — see implementation.

Source

pub fn bk_tree(t: Arc<Mutex<BkTreeSketch>>) -> Self

bk_tree — see implementation.

Source

pub fn as_bk_tree(&self) -> Option<Arc<Mutex<BkTreeSketch>>>

as_bk_tree — see implementation.

Source

pub fn rope(r: Arc<Mutex<RopeSketch>>) -> Self

rope — see implementation.

Source

pub fn as_rope(&self) -> Option<Arc<Mutex<RopeSketch>>>

as_rope — see implementation.

Source

pub fn kv_store(k: Arc<Mutex<KvStore>>) -> Self

kv_store — see implementation.

Source

pub fn as_kv_store(&self) -> Option<Arc<Mutex<KvStore>>>

as_kv_store — see implementation.

Source

pub fn pipeline(p: Arc<Mutex<PipelineInner>>) -> Self

pipeline — see implementation.

Source

pub fn capture(c: Arc<CaptureResult>) -> Self

capture — see implementation.

Source

pub fn ppool(p: PerlPpool) -> Self

ppool — see implementation.

Source

pub fn remote_cluster(c: Arc<RemoteCluster>) -> Self

remote_cluster — see implementation.

Source

pub fn barrier(b: PerlBarrier) -> Self

barrier — see implementation.

Source

pub fn sqlite_conn(c: Arc<Mutex<Connection>>) -> Self

sqlite_conn — see implementation.

Source

pub fn struct_inst(s: Arc<StructInstance>) -> Self

struct_inst — see implementation.

Source

pub fn enum_inst(e: Arc<EnumInstance>) -> Self

enum_inst — see implementation.

Source

pub fn class_inst(c: Arc<ClassInstance>) -> Self

class_inst — see implementation.

Source

pub fn dataframe(df: Arc<Mutex<PerlDataFrame>>) -> Self

dataframe — see implementation.

Source

pub fn errno_dual(code: i32, msg: String) -> Self

OS errno dualvar ($!) or eval-error dualvar ($@): to_int/to_number use code; string context uses msg.

Source

pub fn as_str(&self) -> Option<String>

Heap string payload, if any (allocates).

Source

pub fn append_to(&self, buf: &mut String)

append_to — see implementation.

Source

pub fn unwrap_atomic(&self) -> StrykeValue

unwrap_atomic — see implementation.

Source

pub fn is_atomic(&self) -> bool

is_atomic — see implementation.

Source

pub fn is_true(&self) -> bool

is_true — see implementation.

Source

pub fn into_string(self) -> String

into_string — see implementation.

Source

pub fn as_str_or_empty(&self) -> String

as_str_or_empty — see implementation.

Source

pub fn to_number(&self) -> f64

to_number — see implementation.

Source

pub fn to_int(&self) -> i64

to_int — see implementation.

Source

pub fn type_name(&self) -> String

type_name — see implementation.

Source

pub fn ref_type(&self) -> StrykeValue

ref_type — see implementation.

Source

pub fn num_cmp(&self, other: &StrykeValue) -> Ordering

num_cmp — see implementation.

Source

pub fn str_eq(&self, other: &StrykeValue) -> bool

String equality for eq / cmp without allocating when both sides are heap strings.

Source

pub fn str_cmp(&self, other: &StrykeValue) -> Ordering

str_cmp — see implementation.

Source

pub fn struct_field_eq(&self, other: &StrykeValue) -> bool

Deep equality for struct fields (recursive).

Source

pub fn deep_clone(&self) -> StrykeValue

Deep clone a value (used for struct clone).

Source

pub fn to_list(&self) -> Vec<StrykeValue>

to_list — see implementation.

Source

pub fn scalar_context(&self) -> StrykeValue

scalar_context — see implementation.

Trait Implementations§

Source§

impl Clone for StrykeValue

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for StrykeValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StrykeValue

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for StrykeValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for StrykeValue

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

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

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

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

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

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

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

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

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

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<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

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

Source§

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

impl<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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