Trait spl_pod::option::Nullable

source ·
pub trait Nullable:
    PartialEq
    + Pod
    + Sized {
    const NONE: Self;

    // Provided methods
    fn is_none(&self) -> bool { ... }
    fn is_some(&self) -> bool { ... }
}
Expand description

Trait for types that can be None.

This trait is used to indicate that a type can be None according to a specific value.

Required Associated Constants§

source

const NONE: Self

Value that represents None for the type.

Provided Methods§

source

fn is_none(&self) -> bool

Indicates whether the value is None or not.

source

fn is_some(&self) -> bool

Indicates whether the value is Some`` value of type T`` or not.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Nullable for Pubkey

Implementation of Nullable for Pubkey.

source§

const NONE: Self = _

Implementors§