# Struct pages::db::EVENTS

source · [−]

    pub struct EVENTS {
        __private_field: (),
    }

## Fields

`__private_field: ()`

## Methods from Deref<Target = [&'static Event ; 3]>

1.57.0 · source

#### pub fn as_slice(&self) -> &[T] ⓘNotable traits for &mut [u8]`impl Write for &mut [u8]impl Read for &[u8]`

Returns a slice containing the entire array. Equivalent to `&s[..]`.

source

#### pub fn each_ref(&self) -> [ &T; N]

🔬This is a nightly-only experimental API. (`array_methods`)

Borrows each element and returns an array of references with the same size as `self`.

##### Example

    #![feature(array_methods)]

    let floats = [3.1, 2.7, -1.0];
    let float_refs: [&f64; 3] = floats.each_ref();
    assert_eq!(float_refs, [&3.1, &2.7, &-1.0]);

This method is particularly useful if combined with other methods, like `map`. This way, you can avoid moving the original array if its elements are not `Copy`.

    #![feature(array_methods)]

    let strings = ["Ferris".to_string(), "♥".to_string(), "Rust".to_string()];
    let is_ascii = strings.each_ref().map(|s| s.is_ascii());
    assert_eq!(is_ascii, [true, false, true]);

    // We can still access the original array: it has not been moved.
    assert_eq!(strings.len(), 3);

source

#### pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

🔬This is a nightly-only experimental API. (`split_array`)

Divides one array reference into two at an index.

The first will contain all indices from `[0, M)` (excluding the index `M` itself) and the second will contain all indices from `[M, N)` (excluding the index `N` itself).

##### Panics

Panics if `M > N`.

##### Examples

    #![feature(split_array)]

    let v = [1, 2, 3, 4, 5, 6];

    {
       let (left, right) = v.split_array_ref::<0>();
       assert_eq!(left, &[]);
       assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
    }

    {
        let (left, right) = v.split_array_ref::<2>();
        assert_eq!(left, &[1, 2]);
        assert_eq!(right, &[3, 4, 5, 6]);
    }

    {
        let (left, right) = v.split_array_ref::<6>();
        assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
        assert_eq!(right, &[]);
    }

source

#### pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

🔬This is a nightly-only experimental API. (`split_array`)

Divides one array reference into two at an index from the end.

The first will contain all indices from `[0, N - M)` (excluding the index `N - M` itself) and the second will contain all indices from `[N - M, N)` (excluding the index `N` itself).

##### Panics

Panics if `M > N`.

##### Examples

    #![feature(split_array)]

    let v = [1, 2, 3, 4, 5, 6];

    {
       let (left, right) = v.rsplit_array_ref::<0>();
       assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
       assert_eq!(right, &[]);
    }

    {
        let (left, right) = v.rsplit_array_ref::<2>();
        assert_eq!(left, &[1, 2, 3, 4]);
        assert_eq!(right, &[5, 6]);
    }

    {
        let (left, right) = v.rsplit_array_ref::<6>();
        assert_eq!(left, &[]);
        assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
    }

## Trait Implementations

source

### impl Deref for EVENTS

#### type Target = [&'static Event ; 3]

The resulting type after dereferencing.
source

#### fn deref(&self) -> &[&'static Event ; 3]

Dereferences the value.
source

### impl LazyStatic for EVENTS

## Auto Trait Implementations

### impl RefUnwindSafe for EVENTS

### impl Send for EVENTS

### impl Sync for EVENTS

### impl Unpin for EVENTS

### impl UnwindSafe for EVENTS

## Blanket Implementations

source

### impl<T> Any for Twhere
T: 'static + ?Sized,

source

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
source

### impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source

### impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source

### impl<T> From<T> for T

const: unstable · source

#### fn from(t: T) -> T

Returns the argument unchanged.

source

### impl<T> Instrument for T

source

#### fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided `Span`, returning an `Instrumented` wrapper. Read more
source

#### fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current `Span`, returning an `Instrumented` wrapper. Read more
source

### impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · 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<T> Same<T> for T

#### type Output = T

Should always be `Self`
source

### impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

#### type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source

### impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source

#### fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

### impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,

#### fn vzip(self) -> V

source

### impl<T> WithSubscriber for T

source

#### fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,

Attaches the provided `Subscriber` to this type, returning a `WithDispatch` wrapper. Read more
source

#### fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default `Subscriber` to this type, returning a `WithDispatch` wrapper. Read more