Movatterモバイル変換


[0]ホーム

URL:


[][src]Structrustpython_vm::pyobject::PyRef

pub struct PyRef<T> { /* fields omitted */ }

A reference to a Python object.

Note that aPyRef<T> can only deref to a shared / immutable reference.It is the payload type's responsibility to handle (possibly concurrent)mutability with locks or concurrent data structures if required.

APyRef<T> can be directly returned from a built-in function to handlesituations (such as when implementing in-place methods such as__iadd__)where a reference to the same object must be returned.

Methods

impl<T: PyValue>PyRef<T>[src]

pub fnas_object(&self) -> &PyObjectRef[src]

pub fninto_object(self) ->PyObjectRef[src]

pub fntyp(&self) ->PyClassRef[src]

Trait Implementations

impl<T>Clone forPyRef<T>[src]

fnclone(&self) -> Self[src]

fnclone_from(&mut self, source:&Self)1.0.0[src]

impl<T: Debug>Debug forPyRef<T>[src]

fnfmt(&self, f: &mutFormatter) ->Result[src]

impl<T>Deref forPyRef<T>where
    T:PyValue
[src]

typeTarget = T

The resulting type after dereferencing.

fnderef(&self) ->&T[src]

impl<T: Display>Display forPyRef<T>where
    T:PyValue +Display
[src]

fnfmt(&self, f: &mutFormatter) ->Result[src]

impl<'a, T: PyValue>From<&'aPyRef<T>> for &'aPyObjectRef[src]

fnfrom(obj: &'aPyRef<T>) -> Self[src]

implFrom<PyRef<PyBaseException>> forArgumentError[src]

fnfrom(ex:PyBaseExceptionRef) -> Self[src]

impl<T: PyValue>From<PyRef<T>> forPyObjectRef[src]

fnfrom(obj:PyRef<T>) -> Self[src]

impl<T: PyObjectPayload>IdProtocol forPyRef<T>[src]

fnget_id(&self) ->usize[src]

fnis<T>(&self, other:&T) ->boolwhere
    T:IdProtocol
[src]

impl<T>IntoPyObject forPyRef<T>[src]

impl<T>PyClassDef forPyRef<T>where
    T:PyClassDef
[src]

constNAME: &'staticstr[src]

constDOC:Option<&'staticstr>[src]

implPyClassImpl forPyRef<Frame>[src]

impl<T>TryFromObject forPyRef<T>where
    T:PyValue
[src]

fntry_from_object(vm: &VirtualMachine, obj:PyObjectRef) ->PyResult<Self>[src]

impl<T>TryIntoRef<T> forPyRef<T>[src]

impl<T>TypeProtocol forPyRef<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe forPyRef<T>

impl<T> !Send forPyRef<T>

impl<T> !Sync forPyRef<T>

impl<T>Unpin forPyRef<T>where
    T:Unpin

impl<T> !UnwindSafe forPyRef<T>

Blanket Implementations

impl<T>Any for Twhere
    T: 'static + ?Sized
[src]

fntype_id(&self) ->TypeId[src]

impl<T>Borrow<T> for Twhere
    T: ?Sized
[src]

fnborrow(&self) ->&T[src]

impl<T>BorrowMut<T> for Twhere
    T: ?Sized
[src]

fnborrow_mut(&mut self) ->&mutT[src]

impl<T>From<T> for T[src]

fnfrom(t: T) -> T[src]

impl<T>FromArgs for Twhere
    T:TryFromObject
[src]

fnarity() ->RangeInclusive<usize>[src]

fnfrom_args(&VirtualMachine, &mutPyFuncArgs) ->Result<T,ArgumentError>[src]

impl<T, U>Into<U> for Twhere
    U:From<T>, 
[src]

fninto(self) -> U[src]

impl<I>IntoIterator for Iwhere
    I:Iterator
[src]

typeItem = <I asIterator>::Item

The type of the elements being iterated over.

typeIntoIter = I

Which kind of iterator are we turning this into?

fninto_iter(self) -> I[src]

impl<T>IntoPyObject for Twhere
    T:PyValue
[src]

impl<T> Same<T> for T

typeOutput = T

Should always beSelf

impl<T>ToOwned for Twhere
    T:Clone
[src]

typeOwned = T

The resulting type after obtaining ownership.

fnto_owned(&self) -> T[src]

fnclone_into(&self, target:&mutT)[src]

impl<T>ToString for Twhere
    T:Display + ?Sized
[src]

default fnto_string(&self) ->String[src]

impl<T, U>TryFrom<U> for Twhere
    U:Into<T>, 
[src]

typeError =Infallible

The type returned in the event of a conversion error.

fntry_from(value: U) ->Result<T, <T asTryFrom<U>>::Error>[src]

impl<T, U>TryInto<U> for Twhere
    U:TryFrom<T>, 
[src]

typeError = <U asTryFrom<T>>::Error

The type returned in the event of a conversion error.

fntry_into(self) ->Result<U, <U asTryFrom<T>>::Error>[src]

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

fnvzip(self) -> V


[8]ページ先頭

©2009-2025 Movatter.jp