Struct Named
pub(crate) struct Named<T>(pub(crate) T);Expand description
A vocabulary value as a Python caller names it: the class, or its spelling.
An extractable newtype rather than a &Bound<PyAny> parameter, for one
reason: a &Bound can only be built while holding the GIL, and the crate’s
own Rust tests call these entry points directly with no Python token.
This keeps the two accepted forms visible to pyo3 and leaves a Rust
caller able to state one — Named::parsed — without a typed sibling per
entry point.
Tuple Fields§
§0: TImplementations§
§impl Named<DayCountFraction>
impl Named<DayCountFraction>
pub(crate) fn convention(self) -> DayCountFraction
pub(crate) fn convention(self) -> DayCountFraction
The convention this names.
Trait Implementations§
impl<T: Copy> Copy for Named<T>
Auto Trait Implementations§
impl<T> Freeze for Named<T>where
T: Freeze,
impl<T> RefUnwindSafe for Named<T>where
T: RefUnwindSafe,
impl<T> Send for Named<T>where
T: Send,
impl<T> Sync for Named<T>where
T: Sync,
impl<T> Unpin for Named<T>where
T: Unpin,
impl<T> UnsafeUnpin for Named<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Named<T>where
T: UnwindSafe,
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