pub struct Angle { /* private fields */ }Expand description
An angle describing a rotation.
Stored in radians.
See the Typst documentation.
§Examples
use typwire::{Angle, initiate_protocol};
initiate_protocol!();
#[typwire::export]
fn degrees(angle: Angle) -> Result<f64, String> {
Ok(angle.deg())
}Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Angle
impl<'de> Deserialize<'de> for Angle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialOrd for Angle
impl PartialOrd for Angle
impl StructuralPartialEq for Angle
impl Typwire for Angle
Auto Trait Implementations§
impl Forget for Angle
impl Freeze for Angle
impl Move for Angle
impl RefUnwindSafe for Angle
impl Send for Angle
impl Sync for Angle
impl Unpin for Angle
impl UnsafeUnpin for Angle
impl UnwindSafe for Angle
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