Fixed

Struct Fixed 

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

A signed 24.8 fixed-point number used in the wayland protocol.

This is a signed decimal type which offers a sign bit, 23 bits of integer precision and 8 bits of decimal precision.

§Arithmetic operations

This type implements all of the usual arithmetic operations for numbers. On overflow, they behave like the standard library operations except that multiplication and division always use wrapping semantics.

Implementations§

Source§

impl Fixed

Source

pub const MAX: Self

The largest Fixed.

Source

pub const MIN: Self

The smallest Fixed.

Source

pub const ZERO: Self

The 0 Fixed.

Source

pub const ONE: Self

The 1 Fixed.

Source

pub const TWO: Self

The 2 Fixed.

Source

pub const EPSILON: Self

The smallest positive Fixed.

Source

pub const NEGATIVE_EPSILON: Self

The largest negative Fixed.

Source

pub const fn from_wire(val: i32) -> Self

Creates a Fixed from the raw bits that appear in the wire protocol.

Examples found in repository?
examples/simple-window/../common/protocols/tablet_v2/zwp_tablet_pad_ring_v2.rs (line 362)
340    unsafe fn handle_event(
341        &self,
342        queue: &Queue,
343        data: *mut u8,
344        slf: &UntypedBorrowedProxy,
345        opcode: u32,
346        args: *mut wl_argument,
347    ) {
348        // SAFETY: This function requires that slf has the interface INTERFACE
349        let slf = unsafe { proxy::low_level::from_untyped_borrowed::<ZwpTabletPadRingV2Ref>(slf) };
350        match opcode {
351            0 => {
352                // SAFETY: INTERFACE requires that there are 1 arguments
353                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
354                // SAFETY: - INTERFACE requires that args[0] contains a uint
355                let arg0 = unsafe { ZwpTabletPadRingV2Source(args[0].u) };
356                self.0.source(slf, arg0);
357            }
358            1 => {
359                // SAFETY: INTERFACE requires that there are 1 arguments
360                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
361                // SAFETY: - INTERFACE requires that args[0] contains a fixed
362                let arg0 = unsafe { Fixed::from_wire(args[0].f) };
363                self.0.angle(slf, arg0);
364            }
365            2 => {
366                self.0.stop(slf);
367            }
368            3 => {
369                // SAFETY: INTERFACE requires that there are 1 arguments
370                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
371                // SAFETY: - INTERFACE requires that args[0] contains a uint
372                let arg0 = unsafe { args[0].u };
373                self.0.frame(slf, arg0);
374            }
375            _ => {
376                invalid_opcode("zwp_tablet_pad_ring_v2", opcode);
377            }
378        }
379    }
More examples
Hide additional examples
examples/simple-window/../common/protocols_data/tablet_v2/zwp_tablet_pad_ring_v2.rs (line 383)
357    unsafe fn handle_event(
358        &self,
359        queue: &Queue,
360        data: *mut u8,
361        slf: &UntypedBorrowedProxy,
362        opcode: u32,
363        args: *mut wl_argument,
364    ) {
365        // SAFETY: This function requires that slf has the interface INTERFACE
366        let slf = unsafe { proxy::low_level::from_untyped_borrowed::<ZwpTabletPadRingV2Ref>(slf) };
367        // SAFETY: This function requires that data is `&mut T` where `T`
368        //         has the type id returned by `Self::mutable_type`, i.e.,
369        //         `T = H::Data`.
370        let data: &mut H::Data = unsafe { &mut *data.cast() };
371        match opcode {
372            0 => {
373                // SAFETY: INTERFACE requires that there are 1 arguments
374                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
375                // SAFETY: - INTERFACE requires that args[0] contains a uint
376                let arg0 = unsafe { ZwpTabletPadRingV2Source(args[0].u) };
377                self.0.source(data, slf, arg0);
378            }
379            1 => {
380                // SAFETY: INTERFACE requires that there are 1 arguments
381                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
382                // SAFETY: - INTERFACE requires that args[0] contains a fixed
383                let arg0 = unsafe { Fixed::from_wire(args[0].f) };
384                self.0.angle(data, slf, arg0);
385            }
386            2 => {
387                self.0.stop(data, slf);
388            }
389            3 => {
390                // SAFETY: INTERFACE requires that there are 1 arguments
391                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
392                // SAFETY: - INTERFACE requires that args[0] contains a uint
393                let arg0 = unsafe { args[0].u };
394                self.0.frame(data, slf, arg0);
395            }
396            _ => {
397                invalid_opcode("zwp_tablet_pad_ring_v2", opcode);
398            }
399        }
400    }
examples/simple-window/../common/protocols/wayland/wl_touch.rs (line 452)
419    unsafe fn handle_event(
420        &self,
421        queue: &Queue,
422        data: *mut u8,
423        slf: &UntypedBorrowedProxy,
424        opcode: u32,
425        args: *mut wl_argument,
426    ) {
427        // SAFETY: This function requires that slf has the interface INTERFACE
428        let slf = unsafe { proxy::low_level::from_untyped_borrowed::<WlTouchRef>(slf) };
429        match opcode {
430            0 => {
431                // SAFETY: INTERFACE requires that there are 6 arguments
432                let args = unsafe { &*args.cast::<[wl_argument; 6]>() };
433                // SAFETY: - INTERFACE requires that args[0] contains a uint
434                let arg0 = unsafe { args[0].u };
435                // SAFETY: - INTERFACE requires that args[1] contains a uint
436                let arg1 = unsafe { args[1].u };
437                // SAFETY: - INTERFACE requires that args[2] contains an object
438                let arg2 = unsafe {
439                    if let Some(p) = NonNull::new(args[2].o.cast()) {
440                        Some(UntypedBorrowedProxy::new_immutable(queue.libwayland(), p))
441                    } else {
442                        None
443                    }
444                };
445                // SAFETY: - INTERFACE requires that the object has the interface WlSurface::WL_INTERFACE
446                let arg2 = arg2.as_ref().map(|arg2| unsafe {
447                    proxy::low_level::from_untyped_borrowed::<WlSurfaceRef>(arg2)
448                });
449                // SAFETY: - INTERFACE requires that args[3] contains an int
450                let arg3 = unsafe { args[3].i };
451                // SAFETY: - INTERFACE requires that args[4] contains a fixed
452                let arg4 = unsafe { Fixed::from_wire(args[4].f) };
453                // SAFETY: - INTERFACE requires that args[5] contains a fixed
454                let arg5 = unsafe { Fixed::from_wire(args[5].f) };
455                self.0.down(slf, arg0, arg1, arg2, arg3, arg4, arg5);
456            }
457            1 => {
458                // SAFETY: INTERFACE requires that there are 3 arguments
459                let args = unsafe { &*args.cast::<[wl_argument; 3]>() };
460                // SAFETY: - INTERFACE requires that args[0] contains a uint
461                let arg0 = unsafe { args[0].u };
462                // SAFETY: - INTERFACE requires that args[1] contains a uint
463                let arg1 = unsafe { args[1].u };
464                // SAFETY: - INTERFACE requires that args[2] contains an int
465                let arg2 = unsafe { args[2].i };
466                self.0.up(slf, arg0, arg1, arg2);
467            }
468            2 => {
469                // SAFETY: INTERFACE requires that there are 4 arguments
470                let args = unsafe { &*args.cast::<[wl_argument; 4]>() };
471                // SAFETY: - INTERFACE requires that args[0] contains a uint
472                let arg0 = unsafe { args[0].u };
473                // SAFETY: - INTERFACE requires that args[1] contains an int
474                let arg1 = unsafe { args[1].i };
475                // SAFETY: - INTERFACE requires that args[2] contains a fixed
476                let arg2 = unsafe { Fixed::from_wire(args[2].f) };
477                // SAFETY: - INTERFACE requires that args[3] contains a fixed
478                let arg3 = unsafe { Fixed::from_wire(args[3].f) };
479                self.0.motion(slf, arg0, arg1, arg2, arg3);
480            }
481            3 => {
482                self.0.frame(slf);
483            }
484            4 => {
485                self.0.cancel(slf);
486            }
487            5 => {
488                // SAFETY: INTERFACE requires that there are 3 arguments
489                let args = unsafe { &*args.cast::<[wl_argument; 3]>() };
490                // SAFETY: - INTERFACE requires that args[0] contains an int
491                let arg0 = unsafe { args[0].i };
492                // SAFETY: - INTERFACE requires that args[1] contains a fixed
493                let arg1 = unsafe { Fixed::from_wire(args[1].f) };
494                // SAFETY: - INTERFACE requires that args[2] contains a fixed
495                let arg2 = unsafe { Fixed::from_wire(args[2].f) };
496                self.0.shape(slf, arg0, arg1, arg2);
497            }
498            6 => {
499                // SAFETY: INTERFACE requires that there are 2 arguments
500                let args = unsafe { &*args.cast::<[wl_argument; 2]>() };
501                // SAFETY: - INTERFACE requires that args[0] contains an int
502                let arg0 = unsafe { args[0].i };
503                // SAFETY: - INTERFACE requires that args[1] contains a fixed
504                let arg1 = unsafe { Fixed::from_wire(args[1].f) };
505                self.0.orientation(slf, arg0, arg1);
506            }
507            _ => {
508                invalid_opcode("wl_touch", opcode);
509            }
510        }
511    }
examples/simple-window/../common/protocols_data/wayland/wl_touch.rs (line 484)
447    unsafe fn handle_event(
448        &self,
449        queue: &Queue,
450        data: *mut u8,
451        slf: &UntypedBorrowedProxy,
452        opcode: u32,
453        args: *mut wl_argument,
454    ) {
455        // SAFETY: This function requires that slf has the interface INTERFACE
456        let slf = unsafe { proxy::low_level::from_untyped_borrowed::<WlTouchRef>(slf) };
457        // SAFETY: This function requires that data is `&mut T` where `T`
458        //         has the type id returned by `Self::mutable_type`, i.e.,
459        //         `T = H::Data`.
460        let data: &mut H::Data = unsafe { &mut *data.cast() };
461        match opcode {
462            0 => {
463                // SAFETY: INTERFACE requires that there are 6 arguments
464                let args = unsafe { &*args.cast::<[wl_argument; 6]>() };
465                // SAFETY: - INTERFACE requires that args[0] contains a uint
466                let arg0 = unsafe { args[0].u };
467                // SAFETY: - INTERFACE requires that args[1] contains a uint
468                let arg1 = unsafe { args[1].u };
469                // SAFETY: - INTERFACE requires that args[2] contains an object
470                let arg2 = unsafe {
471                    if let Some(p) = NonNull::new(args[2].o.cast()) {
472                        Some(UntypedBorrowedProxy::new_immutable(queue.libwayland(), p))
473                    } else {
474                        None
475                    }
476                };
477                // SAFETY: - INTERFACE requires that the object has the interface WlSurface::WL_INTERFACE
478                let arg2 = arg2.as_ref().map(|arg2| unsafe {
479                    proxy::low_level::from_untyped_borrowed::<WlSurfaceRef>(arg2)
480                });
481                // SAFETY: - INTERFACE requires that args[3] contains an int
482                let arg3 = unsafe { args[3].i };
483                // SAFETY: - INTERFACE requires that args[4] contains a fixed
484                let arg4 = unsafe { Fixed::from_wire(args[4].f) };
485                // SAFETY: - INTERFACE requires that args[5] contains a fixed
486                let arg5 = unsafe { Fixed::from_wire(args[5].f) };
487                self.0.down(data, slf, arg0, arg1, arg2, arg3, arg4, arg5);
488            }
489            1 => {
490                // SAFETY: INTERFACE requires that there are 3 arguments
491                let args = unsafe { &*args.cast::<[wl_argument; 3]>() };
492                // SAFETY: - INTERFACE requires that args[0] contains a uint
493                let arg0 = unsafe { args[0].u };
494                // SAFETY: - INTERFACE requires that args[1] contains a uint
495                let arg1 = unsafe { args[1].u };
496                // SAFETY: - INTERFACE requires that args[2] contains an int
497                let arg2 = unsafe { args[2].i };
498                self.0.up(data, slf, arg0, arg1, arg2);
499            }
500            2 => {
501                // SAFETY: INTERFACE requires that there are 4 arguments
502                let args = unsafe { &*args.cast::<[wl_argument; 4]>() };
503                // SAFETY: - INTERFACE requires that args[0] contains a uint
504                let arg0 = unsafe { args[0].u };
505                // SAFETY: - INTERFACE requires that args[1] contains an int
506                let arg1 = unsafe { args[1].i };
507                // SAFETY: - INTERFACE requires that args[2] contains a fixed
508                let arg2 = unsafe { Fixed::from_wire(args[2].f) };
509                // SAFETY: - INTERFACE requires that args[3] contains a fixed
510                let arg3 = unsafe { Fixed::from_wire(args[3].f) };
511                self.0.motion(data, slf, arg0, arg1, arg2, arg3);
512            }
513            3 => {
514                self.0.frame(data, slf);
515            }
516            4 => {
517                self.0.cancel(data, slf);
518            }
519            5 => {
520                // SAFETY: INTERFACE requires that there are 3 arguments
521                let args = unsafe { &*args.cast::<[wl_argument; 3]>() };
522                // SAFETY: - INTERFACE requires that args[0] contains an int
523                let arg0 = unsafe { args[0].i };
524                // SAFETY: - INTERFACE requires that args[1] contains a fixed
525                let arg1 = unsafe { Fixed::from_wire(args[1].f) };
526                // SAFETY: - INTERFACE requires that args[2] contains a fixed
527                let arg2 = unsafe { Fixed::from_wire(args[2].f) };
528                self.0.shape(data, slf, arg0, arg1, arg2);
529            }
530            6 => {
531                // SAFETY: INTERFACE requires that there are 2 arguments
532                let args = unsafe { &*args.cast::<[wl_argument; 2]>() };
533                // SAFETY: - INTERFACE requires that args[0] contains an int
534                let arg0 = unsafe { args[0].i };
535                // SAFETY: - INTERFACE requires that args[1] contains a fixed
536                let arg1 = unsafe { Fixed::from_wire(args[1].f) };
537                self.0.orientation(data, slf, arg0, arg1);
538            }
539            _ => {
540                invalid_opcode("wl_touch", opcode);
541            }
542        }
543    }
examples/simple-window/../common/protocols/wayland/wl_data_device.rs (line 536)
490    unsafe fn handle_event(
491        &self,
492        queue: &Queue,
493        data: *mut u8,
494        slf: &UntypedBorrowedProxy,
495        opcode: u32,
496        args: *mut wl_argument,
497    ) {
498        // SAFETY: This function requires that slf has the interface INTERFACE
499        let slf = unsafe { proxy::low_level::from_untyped_borrowed::<WlDataDeviceRef>(slf) };
500        match opcode {
501            0 => {
502                // SAFETY: INTERFACE requires that there are 1 arguments
503                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
504                // SAFETY: - INTERFACE requires that args[0] contains an object
505                //         - ownership is transferred to this function
506                //         - INTERFACE requires that the object has the interface WlDataOffer::WL_INTERFACE
507                let arg0 = unsafe {
508                    UntypedOwnedProxy::from_plain_wl_proxy(
509                        queue,
510                        NonNull::new_unchecked(args[0].o.cast()),
511                        WlDataOffer::WL_INTERFACE,
512                    )
513                };
514                // SAFETY: - INTERFACE requires that the object has the interface WlDataOffer::WL_INTERFACE
515                let arg0 = unsafe { proxy::low_level::from_untyped_owned::<WlDataOffer>(arg0) };
516                self.0.data_offer(slf, arg0);
517            }
518            1 => {
519                // SAFETY: INTERFACE requires that there are 5 arguments
520                let args = unsafe { &*args.cast::<[wl_argument; 5]>() };
521                // SAFETY: - INTERFACE requires that args[0] contains a uint
522                let arg0 = unsafe { args[0].u };
523                // SAFETY: - INTERFACE requires that args[1] contains an object
524                let arg1 = unsafe {
525                    if let Some(p) = NonNull::new(args[1].o.cast()) {
526                        Some(UntypedBorrowedProxy::new_immutable(queue.libwayland(), p))
527                    } else {
528                        None
529                    }
530                };
531                // SAFETY: - INTERFACE requires that the object has the interface WlSurface::WL_INTERFACE
532                let arg1 = arg1.as_ref().map(|arg1| unsafe {
533                    proxy::low_level::from_untyped_borrowed::<WlSurfaceRef>(arg1)
534                });
535                // SAFETY: - INTERFACE requires that args[2] contains a fixed
536                let arg2 = unsafe { Fixed::from_wire(args[2].f) };
537                // SAFETY: - INTERFACE requires that args[3] contains a fixed
538                let arg3 = unsafe { Fixed::from_wire(args[3].f) };
539                // SAFETY: - INTERFACE requires that args[4] contains an object
540                let arg4 = unsafe {
541                    if let Some(p) = NonNull::new(args[4].o.cast()) {
542                        Some(UntypedBorrowedProxy::new_immutable(queue.libwayland(), p))
543                    } else {
544                        None
545                    }
546                };
547                // SAFETY: - INTERFACE requires that the object has the interface WlDataOffer::WL_INTERFACE
548                let arg4 = arg4.as_ref().map(|arg4| unsafe {
549                    proxy::low_level::from_untyped_borrowed::<WlDataOfferRef>(arg4)
550                });
551                self.0.enter(slf, arg0, arg1, arg2, arg3, arg4);
552            }
553            2 => {
554                self.0.leave(slf);
555            }
556            3 => {
557                // SAFETY: INTERFACE requires that there are 3 arguments
558                let args = unsafe { &*args.cast::<[wl_argument; 3]>() };
559                // SAFETY: - INTERFACE requires that args[0] contains a uint
560                let arg0 = unsafe { args[0].u };
561                // SAFETY: - INTERFACE requires that args[1] contains a fixed
562                let arg1 = unsafe { Fixed::from_wire(args[1].f) };
563                // SAFETY: - INTERFACE requires that args[2] contains a fixed
564                let arg2 = unsafe { Fixed::from_wire(args[2].f) };
565                self.0.motion(slf, arg0, arg1, arg2);
566            }
567            4 => {
568                self.0.drop(slf);
569            }
570            5 => {
571                // SAFETY: INTERFACE requires that there are 1 arguments
572                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
573                // SAFETY: - INTERFACE requires that args[0] contains an object
574                let arg0 = unsafe {
575                    if let Some(p) = NonNull::new(args[0].o.cast()) {
576                        Some(UntypedBorrowedProxy::new_immutable(queue.libwayland(), p))
577                    } else {
578                        None
579                    }
580                };
581                // SAFETY: - INTERFACE requires that the object has the interface WlDataOffer::WL_INTERFACE
582                let arg0 = arg0.as_ref().map(|arg0| unsafe {
583                    proxy::low_level::from_untyped_borrowed::<WlDataOfferRef>(arg0)
584                });
585                self.0.selection(slf, arg0);
586            }
587            _ => {
588                invalid_opcode("wl_data_device", opcode);
589            }
590        }
591    }
examples/simple-window/../common/protocols_data/wayland/wl_data_device.rs (line 565)
515    unsafe fn handle_event(
516        &self,
517        queue: &Queue,
518        data: *mut u8,
519        slf: &UntypedBorrowedProxy,
520        opcode: u32,
521        args: *mut wl_argument,
522    ) {
523        // SAFETY: This function requires that slf has the interface INTERFACE
524        let slf = unsafe { proxy::low_level::from_untyped_borrowed::<WlDataDeviceRef>(slf) };
525        // SAFETY: This function requires that data is `&mut T` where `T`
526        //         has the type id returned by `Self::mutable_type`, i.e.,
527        //         `T = H::Data`.
528        let data: &mut H::Data = unsafe { &mut *data.cast() };
529        match opcode {
530            0 => {
531                // SAFETY: INTERFACE requires that there are 1 arguments
532                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
533                // SAFETY: - INTERFACE requires that args[0] contains an object
534                //         - ownership is transferred to this function
535                //         - INTERFACE requires that the object has the interface WlDataOffer::WL_INTERFACE
536                let arg0 = unsafe {
537                    UntypedOwnedProxy::from_plain_wl_proxy(
538                        queue,
539                        NonNull::new_unchecked(args[0].o.cast()),
540                        WlDataOffer::WL_INTERFACE,
541                    )
542                };
543                // SAFETY: - INTERFACE requires that the object has the interface WlDataOffer::WL_INTERFACE
544                let arg0 = unsafe { proxy::low_level::from_untyped_owned::<WlDataOffer>(arg0) };
545                self.0.data_offer(data, slf, arg0);
546            }
547            1 => {
548                // SAFETY: INTERFACE requires that there are 5 arguments
549                let args = unsafe { &*args.cast::<[wl_argument; 5]>() };
550                // SAFETY: - INTERFACE requires that args[0] contains a uint
551                let arg0 = unsafe { args[0].u };
552                // SAFETY: - INTERFACE requires that args[1] contains an object
553                let arg1 = unsafe {
554                    if let Some(p) = NonNull::new(args[1].o.cast()) {
555                        Some(UntypedBorrowedProxy::new_immutable(queue.libwayland(), p))
556                    } else {
557                        None
558                    }
559                };
560                // SAFETY: - INTERFACE requires that the object has the interface WlSurface::WL_INTERFACE
561                let arg1 = arg1.as_ref().map(|arg1| unsafe {
562                    proxy::low_level::from_untyped_borrowed::<WlSurfaceRef>(arg1)
563                });
564                // SAFETY: - INTERFACE requires that args[2] contains a fixed
565                let arg2 = unsafe { Fixed::from_wire(args[2].f) };
566                // SAFETY: - INTERFACE requires that args[3] contains a fixed
567                let arg3 = unsafe { Fixed::from_wire(args[3].f) };
568                // SAFETY: - INTERFACE requires that args[4] contains an object
569                let arg4 = unsafe {
570                    if let Some(p) = NonNull::new(args[4].o.cast()) {
571                        Some(UntypedBorrowedProxy::new_immutable(queue.libwayland(), p))
572                    } else {
573                        None
574                    }
575                };
576                // SAFETY: - INTERFACE requires that the object has the interface WlDataOffer::WL_INTERFACE
577                let arg4 = arg4.as_ref().map(|arg4| unsafe {
578                    proxy::low_level::from_untyped_borrowed::<WlDataOfferRef>(arg4)
579                });
580                self.0.enter(data, slf, arg0, arg1, arg2, arg3, arg4);
581            }
582            2 => {
583                self.0.leave(data, slf);
584            }
585            3 => {
586                // SAFETY: INTERFACE requires that there are 3 arguments
587                let args = unsafe { &*args.cast::<[wl_argument; 3]>() };
588                // SAFETY: - INTERFACE requires that args[0] contains a uint
589                let arg0 = unsafe { args[0].u };
590                // SAFETY: - INTERFACE requires that args[1] contains a fixed
591                let arg1 = unsafe { Fixed::from_wire(args[1].f) };
592                // SAFETY: - INTERFACE requires that args[2] contains a fixed
593                let arg2 = unsafe { Fixed::from_wire(args[2].f) };
594                self.0.motion(data, slf, arg0, arg1, arg2);
595            }
596            4 => {
597                self.0.drop(data, slf);
598            }
599            5 => {
600                // SAFETY: INTERFACE requires that there are 1 arguments
601                let args = unsafe { &*args.cast::<[wl_argument; 1]>() };
602                // SAFETY: - INTERFACE requires that args[0] contains an object
603                let arg0 = unsafe {
604                    if let Some(p) = NonNull::new(args[0].o.cast()) {
605                        Some(UntypedBorrowedProxy::new_immutable(queue.libwayland(), p))
606                    } else {
607                        None
608                    }
609                };
610                // SAFETY: - INTERFACE requires that the object has the interface WlDataOffer::WL_INTERFACE
611                let arg0 = arg0.as_ref().map(|arg0| unsafe {
612                    proxy::low_level::from_untyped_borrowed::<WlDataOfferRef>(arg0)
613                });
614                self.0.selection(data, slf, arg0);
615            }
616            _ => {
617                invalid_opcode("wl_data_device", opcode);
618            }
619        }
620    }
Source

pub const fn to_wire(self) -> i32

Converts this Fixed to the bits that should be set in the wire protocol.

Examples found in repository?
examples/simple-window/../common/protocols/viewporter/wp_viewport.rs (line 231)
228    pub fn set_source(&self, x: Fixed, y: Fixed, width: Fixed, height: Fixed) {
229        let (arg0, arg1, arg2, arg3) = (x, y, width, height);
230        let mut args = [
231            wl_argument { f: arg0.to_wire() },
232            wl_argument { f: arg1.to_wire() },
233            wl_argument { f: arg2.to_wire() },
234            wl_argument { f: arg3.to_wire() },
235        ];
236        // SAFETY: - self.proxy has the interface INTERFACE
237        //         - 1 < INTERFACE.method_count = 3
238        //         - the request signature is `ffff`
239        unsafe {
240            self.proxy.send_request(1, &mut args);
241        }
242    }
More examples
Hide additional examples
examples/simple-window/../common/protocols_data/viewporter/wp_viewport.rs (line 231)
228    pub fn set_source(&self, x: Fixed, y: Fixed, width: Fixed, height: Fixed) {
229        let (arg0, arg1, arg2, arg3) = (x, y, width, height);
230        let mut args = [
231            wl_argument { f: arg0.to_wire() },
232            wl_argument { f: arg1.to_wire() },
233            wl_argument { f: arg2.to_wire() },
234            wl_argument { f: arg3.to_wire() },
235        ];
236        // SAFETY: - self.proxy has the interface INTERFACE
237        //         - 1 < INTERFACE.method_count = 3
238        //         - the request signature is `ffff`
239        unsafe {
240            self.proxy.send_request(1, &mut args);
241        }
242    }
Source

pub const fn to_f64(self) -> f64

Converts this Fixed to an f64.

This conversion is lossless.

Source

pub const fn to_f32_lossy(self) -> f32

Converts this Fixed to an f32.

This conversion is lossy if there are more than 24 significant bits in this Fixed.

Source

pub const fn from_f64_lossy(val: f64) -> Self

Creates a Fixed from an f64.

If the value cannot be represented exactly, the behavior is as when an f64 is cast to an integer. That is

  • Values are rounded towards 0.
  • NaN returns Fixed::ZERO.
  • Values larger than the maximum return Fixed::MAX.
  • Values smaller than the minimum return Fixed::MIN.
Source

pub const fn from_f32_lossy(val: f32) -> Self

Creates a Fixed from an f32.

The conversion behavior is the same as for Fixed::from_f64_lossy.

Source

pub const fn from_i32_saturating(val: i32) -> Self

Creates a Fixed from an i32.

Values outside of the representable range are clamped to Fixed::MIN and Fixed::MAX.

Source

pub const fn from_i64_saturating(val: i64) -> Self

Creates a Fixed from an i64.

Values outside of the representable range are clamped to Fixed::MIN and Fixed::MAX.

Source

pub const fn to_i32_round_towards_nearest(self) -> i32

Converts this Fixed to an i32.

The conversion rounds towards the nearest integer and half-way away from 0.

Source

pub const fn to_i32_round_towards_zero(self) -> i32

Converts this Fixed to an i32.

The conversion rounds towards zero.

Source

pub const fn to_i32_floor(self) -> i32

Converts this Fixed to an i32.

The conversion rounds towards minus infinity.

Source

pub const fn to_i32_ceil(self) -> i32

Converts this Fixed to an i32.

The conversion rounds towards infinity.

Trait Implementations§

Source§

impl Add<&Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Fixed) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Fixed> for Fixed

Source§

type Output = Fixed

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Fixed) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Fixed) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Fixed

Source§

type Output = Fixed

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Fixed) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for Fixed

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl BitAnd<&Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &Fixed) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<&Fixed> for Fixed

Source§

type Output = Fixed

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &Fixed) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Fixed) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd for Fixed

Source§

type Output = Fixed

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Fixed) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for Fixed

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr<&Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &Fixed) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<&Fixed> for Fixed

Source§

type Output = Fixed

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &Fixed) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Fixed) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr for Fixed

Source§

type Output = Fixed

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Fixed) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for Fixed

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor<&Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &Fixed) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<&Fixed> for Fixed

Source§

type Output = Fixed

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &Fixed) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Fixed) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor for Fixed

Source§

type Output = Fixed

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Fixed) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for Fixed

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for Fixed

Source§

fn clone(&self) -> Fixed

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Fixed

Source§

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

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

impl Display for Fixed

Source§

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

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

impl Div<&Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Fixed) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&Fixed> for Fixed

Source§

type Output = Fixed

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Fixed) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Fixed) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for Fixed

Source§

type Output = Fixed

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Fixed) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign for Fixed

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl From<Fixed> for f64

Source§

fn from(value: Fixed) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for Fixed

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for Fixed

Source§

fn from(value: i8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Fixed

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Fixed

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl Hash for Fixed

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Mul<&Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Fixed) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Fixed> for Fixed

Source§

type Output = Fixed

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Fixed) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Fixed) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Fixed

Source§

type Output = Fixed

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Fixed) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign for Fixed

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for &Fixed

Source§

type Output = Fixed

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for Fixed

Source§

type Output = Fixed

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Not for &Fixed

Source§

type Output = Fixed

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Not for Fixed

Source§

type Output = Fixed

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Ord for Fixed

Source§

fn cmp(&self, other: &Fixed) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Fixed

Source§

fn eq(&self, other: &Fixed) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Fixed

Source§

fn partial_cmp(&self, other: &Fixed) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem<&Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Fixed) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&Fixed> for Fixed

Source§

type Output = Fixed

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Fixed) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Fixed) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem for Fixed

Source§

type Output = Fixed

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Fixed) -> Self::Output

Performs the % operation. Read more
Source§

impl RemAssign for Fixed

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl Shl<&i128> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i128) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i128> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i128) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i16> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i16) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i16> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i16) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i32> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i32) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i32> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i32) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i64> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i64) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i64> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i64) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i8> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i8) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&i8> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &i8) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&isize> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &isize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&isize> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &isize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u128> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u128) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u128> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u128) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u16> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u16) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u16> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u16) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u32> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u32) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u32> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u32) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u64> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u64) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u64> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u64) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u8> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u8) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&u8> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &u8) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&usize> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &usize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<&usize> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &usize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i128> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i128) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i128> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i128) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i16> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i16) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i16> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i16) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i32> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i32) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i32> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i32) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i64> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i64) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i64> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i64) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i8> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i8) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<i8> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i8) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<isize> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: isize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<isize> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: isize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u128> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u128) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u128> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u128) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u16> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u16) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u16> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u16) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u32> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u32> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u64> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u64) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u64> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u64) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u8> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u8) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<u8> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: u8) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<usize> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: usize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<usize> for Fixed

Source§

type Output = Fixed

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: usize) -> Self::Output

Performs the << operation. Read more
Source§

impl ShlAssign<&i128> for Fixed

Source§

fn shl_assign(&mut self, rhs: &i128)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&i16> for Fixed

Source§

fn shl_assign(&mut self, rhs: &i16)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&i32> for Fixed

Source§

fn shl_assign(&mut self, rhs: &i32)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&i64> for Fixed

Source§

fn shl_assign(&mut self, rhs: &i64)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&i8> for Fixed

Source§

fn shl_assign(&mut self, rhs: &i8)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&isize> for Fixed

Source§

fn shl_assign(&mut self, rhs: &isize)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&u128> for Fixed

Source§

fn shl_assign(&mut self, rhs: &u128)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&u16> for Fixed

Source§

fn shl_assign(&mut self, rhs: &u16)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&u32> for Fixed

Source§

fn shl_assign(&mut self, rhs: &u32)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&u64> for Fixed

Source§

fn shl_assign(&mut self, rhs: &u64)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&u8> for Fixed

Source§

fn shl_assign(&mut self, rhs: &u8)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&usize> for Fixed

Source§

fn shl_assign(&mut self, rhs: &usize)

Performs the <<= operation. Read more
Source§

impl ShlAssign<i128> for Fixed

Source§

fn shl_assign(&mut self, rhs: i128)

Performs the <<= operation. Read more
Source§

impl ShlAssign<i16> for Fixed

Source§

fn shl_assign(&mut self, rhs: i16)

Performs the <<= operation. Read more
Source§

impl ShlAssign<i32> for Fixed

Source§

fn shl_assign(&mut self, rhs: i32)

Performs the <<= operation. Read more
Source§

impl ShlAssign<i64> for Fixed

Source§

fn shl_assign(&mut self, rhs: i64)

Performs the <<= operation. Read more
Source§

impl ShlAssign<i8> for Fixed

Source§

fn shl_assign(&mut self, rhs: i8)

Performs the <<= operation. Read more
Source§

impl ShlAssign<isize> for Fixed

Source§

fn shl_assign(&mut self, rhs: isize)

Performs the <<= operation. Read more
Source§

impl ShlAssign<u128> for Fixed

Source§

fn shl_assign(&mut self, rhs: u128)

Performs the <<= operation. Read more
Source§

impl ShlAssign<u16> for Fixed

Source§

fn shl_assign(&mut self, rhs: u16)

Performs the <<= operation. Read more
Source§

impl ShlAssign<u32> for Fixed

Source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
Source§

impl ShlAssign<u64> for Fixed

Source§

fn shl_assign(&mut self, rhs: u64)

Performs the <<= operation. Read more
Source§

impl ShlAssign<u8> for Fixed

Source§

fn shl_assign(&mut self, rhs: u8)

Performs the <<= operation. Read more
Source§

impl ShlAssign<usize> for Fixed

Source§

fn shl_assign(&mut self, rhs: usize)

Performs the <<= operation. Read more
Source§

impl Shr<&i128> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i128) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i128> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i128) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i16> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i16) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i16> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i16) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i32> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i32) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i32> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i32) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i64> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i64) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i64> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i64) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i8> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i8) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&i8> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &i8) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&isize> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &isize) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&isize> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &isize) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u128> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u128) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u128> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u128) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u16> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u16) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u16> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u16) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u32> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u32) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u32> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u32) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u64> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u64) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u64> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u64) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u8> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u8) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&u8> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &u8) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&usize> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &usize) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<&usize> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &usize) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i128> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i128) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i128> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i128) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i16> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i16) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i16> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i16) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i32> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i32) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i32> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i32) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i64> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i64) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i64> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i64) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i8> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i8) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<i8> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i8) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<isize> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: isize) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<isize> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: isize) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u128> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u128) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u128> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u128) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u16> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u16) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u16> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u16) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u32> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u32> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u64> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u64) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u64> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u64) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u8> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u8) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<u8> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: u8) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<usize> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: usize) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<usize> for Fixed

Source§

type Output = Fixed

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: usize) -> Self::Output

Performs the >> operation. Read more
Source§

impl ShrAssign<&i128> for Fixed

Source§

fn shr_assign(&mut self, rhs: &i128)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&i16> for Fixed

Source§

fn shr_assign(&mut self, rhs: &i16)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&i32> for Fixed

Source§

fn shr_assign(&mut self, rhs: &i32)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&i64> for Fixed

Source§

fn shr_assign(&mut self, rhs: &i64)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&i8> for Fixed

Source§

fn shr_assign(&mut self, rhs: &i8)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&isize> for Fixed

Source§

fn shr_assign(&mut self, rhs: &isize)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&u128> for Fixed

Source§

fn shr_assign(&mut self, rhs: &u128)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&u16> for Fixed

Source§

fn shr_assign(&mut self, rhs: &u16)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&u32> for Fixed

Source§

fn shr_assign(&mut self, rhs: &u32)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&u64> for Fixed

Source§

fn shr_assign(&mut self, rhs: &u64)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&u8> for Fixed

Source§

fn shr_assign(&mut self, rhs: &u8)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&usize> for Fixed

Source§

fn shr_assign(&mut self, rhs: &usize)

Performs the >>= operation. Read more
Source§

impl ShrAssign<i128> for Fixed

Source§

fn shr_assign(&mut self, rhs: i128)

Performs the >>= operation. Read more
Source§

impl ShrAssign<i16> for Fixed

Source§

fn shr_assign(&mut self, rhs: i16)

Performs the >>= operation. Read more
Source§

impl ShrAssign<i32> for Fixed

Source§

fn shr_assign(&mut self, rhs: i32)

Performs the >>= operation. Read more
Source§

impl ShrAssign<i64> for Fixed

Source§

fn shr_assign(&mut self, rhs: i64)

Performs the >>= operation. Read more
Source§

impl ShrAssign<i8> for Fixed

Source§

fn shr_assign(&mut self, rhs: i8)

Performs the >>= operation. Read more
Source§

impl ShrAssign<isize> for Fixed

Source§

fn shr_assign(&mut self, rhs: isize)

Performs the >>= operation. Read more
Source§

impl ShrAssign<u128> for Fixed

Source§

fn shr_assign(&mut self, rhs: u128)

Performs the >>= operation. Read more
Source§

impl ShrAssign<u16> for Fixed

Source§

fn shr_assign(&mut self, rhs: u16)

Performs the >>= operation. Read more
Source§

impl ShrAssign<u32> for Fixed

Source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
Source§

impl ShrAssign<u64> for Fixed

Source§

fn shr_assign(&mut self, rhs: u64)

Performs the >>= operation. Read more
Source§

impl ShrAssign<u8> for Fixed

Source§

fn shr_assign(&mut self, rhs: u8)

Performs the >>= operation. Read more
Source§

impl ShrAssign<usize> for Fixed

Source§

fn shr_assign(&mut self, rhs: usize)

Performs the >>= operation. Read more
Source§

impl Sub<&Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Fixed) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&Fixed> for Fixed

Source§

type Output = Fixed

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Fixed) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Fixed> for &Fixed

Source§

type Output = Fixed

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Fixed) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for Fixed

Source§

type Output = Fixed

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Fixed) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for Fixed

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl Copy for Fixed

Source§

impl Eq for Fixed

Source§

impl StructuralPartialEq for Fixed

Auto Trait Implementations§

§

impl Freeze for Fixed

§

impl RefUnwindSafe for Fixed

§

impl Send for Fixed

§

impl Sync for Fixed

§

impl Unpin for Fixed

§

impl UnwindSafe for Fixed

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<Lhs, Rhs> IsntPartialEqExt<Lhs, Rhs> for Lhs
where Lhs: PartialEq<Rhs> + ?Sized, Rhs: ?Sized,

Source§

fn not_eq(&self, other: &Rhs) -> bool

The negation of eq
Source§

fn not_ne(&self, other: &Rhs) -> bool

The negation of ne
Source§

impl<Lhs, Rhs> IsntPartialOrdExt<Lhs, Rhs> for Lhs
where Lhs: PartialOrd<Rhs> + ?Sized, Rhs: ?Sized,

Source§

fn not_lt(&self, other: &Rhs) -> bool

The negation of lt
Source§

fn not_le(&self, other: &Rhs) -> bool

The negation of le
Source§

fn not_gt(&self, other: &Rhs) -> bool

The negation of gt
Source§

fn not_ge(&self, other: &Rhs) -> bool

The negation of ge
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<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.