pub struct StructOf<'v, V: UnpackValue<'v>> { /* private fields */ }
Expand description
Like ValueOf
, but only validates value types; does not construct
or store a map.
Implementations§
Trait Implementations§
source§impl<'v, V: UnpackValue<'v>> StarlarkTypeRepr for StructOf<'v, V>
impl<'v, V: UnpackValue<'v>> StarlarkTypeRepr for StructOf<'v, V>
source§fn starlark_type_repr() -> Ty
fn starlark_type_repr() -> Ty
The representation of a type that a user would use verbatim in starlark type annotations
source§impl<'v, V: UnpackValue<'v>> UnpackValue<'v> for StructOf<'v, V>
impl<'v, V: UnpackValue<'v>> UnpackValue<'v> for StructOf<'v, V>
source§fn unpack_value(value: Value<'v>) -> Option<StructOf<'v, V>>
fn unpack_value(value: Value<'v>) -> Option<StructOf<'v, V>>
Given a
Value
, try and unpack it into the given type, which may involve some element of conversion.source§fn unpack_value_err(value: Value<'v>) -> Result<Self>
fn unpack_value_err(value: Value<'v>) -> Result<Self>
Unpack a value, but return error instead of
None
if unpacking fails.source§fn unpack_param(value: Value<'v>) -> Result<Self>
fn unpack_param(value: Value<'v>) -> Result<Self>
Unpack value, but instead of
None
return error about incorrect argument type.Auto Trait Implementations§
impl<'v, V> !RefUnwindSafe for StructOf<'v, V>
impl<'v, V> !Send for StructOf<'v, V>
impl<'v, V> !Sync for StructOf<'v, V>
impl<'v, V> Unpin for StructOf<'v, V>where
V: Unpin,
impl<'v, V> !UnwindSafe for StructOf<'v, V>
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