Struct runestick::Range[][src]

pub struct Range {
    pub start: Option<Value>,
    pub end: Option<Value>,
    pub limits: RangeLimits,
}

Struct representing a dynamic anonymous object.

Examples

use runestick::{Range, RangeLimits, ToValue as _};

let from = 42i64.to_value()?;
let _ = Range::new(Some(from), None, RangeLimits::HalfOpen);

Fields

start: Option<Value>

The start value of the range.

end: Option<Value>

The to value of the range.

limits: RangeLimits

The limits of the range.

Implementations

impl Range[src]

pub fn new(
    start: Option<Value>,
    end: Option<Value>,
    limits: RangeLimits
) -> Self
[src]

Construct a new range.

pub fn into_iterator(self) -> Result<Iterator, Panic>[src]

Coerce range into an iterator.

Trait Implementations

impl Clone for Range[src]

impl Debug for Range[src]

impl From<Range> for Value[src]

impl FromValue for Range[src]

impl InstallWith for Range[src]

impl Named for Range[src]

impl ToValue for Range[src]

impl TypeOf for Range[src]

impl UnsafeFromValue for &Range[src]

type Output = *const Range

The output type from the unsafe coercion.

type Guard = RawRef

The raw guard returned. Read more

impl UnsafeFromValue for &mut Range[src]

type Output = *mut Range

The output type from the unsafe coercion.

type Guard = RawMut

The raw guard returned. Read more

Auto Trait Implementations

impl !RefUnwindSafe for Range

impl !Send for Range

impl !Sync for Range

impl Unpin for Range

impl !UnwindSafe for Range

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.