Enum bitcoin::blockdata::script::MaybeOwned [] [src]

pub enum MaybeOwned<'a> {
    Owned(Vec<u8>),
    Borrowed(&'a [u8]),
}

A structure that can hold either a slice or vector, as necessary

Variants

Owned(Vec<u8>)

Freshly llocated memory

Borrowed(&'a [u8])

Pointer into the original script

Trait Implementations

impl<'a> Debug for MaybeOwned<'a>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<'a> Clone for MaybeOwned<'a>
[src]

fn clone(&self) -> MaybeOwned<'a>

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<'a> PartialEq for MaybeOwned<'a>
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

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

This method tests for !=.

impl<'a> Eq for MaybeOwned<'a>
[src]

impl<'a> Index<usize> for MaybeOwned<'a>
[src]

type Output = u8

The returned type after indexing

fn index(&self, index: usize) -> &u8

The method for the indexing (Foo[Bar]) operation

impl<'a> Index<Range<usize>> for MaybeOwned<'a>
[src]

type Output = [u8]

The returned type after indexing

fn index(&self, index: Range<usize>) -> &[u8]

The method for the indexing (Foo[Bar]) operation

impl<'a> Index<RangeTo<usize>> for MaybeOwned<'a>
[src]

type Output = [u8]

The returned type after indexing

fn index(&self, index: RangeTo<usize>) -> &[u8]

The method for the indexing (Foo[Bar]) operation

impl<'a> Index<RangeFrom<usize>> for MaybeOwned<'a>
[src]

type Output = [u8]

The returned type after indexing

fn index(&self, index: RangeFrom<usize>) -> &[u8]

The method for the indexing (Foo[Bar]) operation

impl<'a> Index<RangeFull> for MaybeOwned<'a>
[src]

type Output = [u8]

The returned type after indexing

fn index(&self, _: RangeFull) -> &[u8]

The method for the indexing (Foo[Bar]) operation