Struct casper_types::contracts::EntryPoints
source · pub struct EntryPoints(/* private fields */);
Expand description
Collection of named entry points
Implementations§
source§impl EntryPoints
impl EntryPoints
sourcepub fn new() -> EntryPoints
pub fn new() -> EntryPoints
Creates empty instance of EntryPoints
.
sourcepub fn add_entry_point(&mut self, entry_point: EntryPoint)
pub fn add_entry_point(&mut self, entry_point: EntryPoint)
Adds new EntryPoint
.
sourcepub fn has_entry_point(&self, entry_point_name: &str) -> bool
pub fn has_entry_point(&self, entry_point_name: &str) -> bool
Checks if given EntryPoint
exists.
sourcepub fn get(&self, entry_point_name: &str) -> Option<&EntryPoint>
pub fn get(&self, entry_point_name: &str) -> Option<&EntryPoint>
Gets an existing EntryPoint
by its name.
sourcepub fn keys(&self) -> impl Iterator<Item = &String>
pub fn keys(&self) -> impl Iterator<Item = &String>
Returns iterator for existing entry point names.
sourcepub fn take_entry_points(self) -> Vec<EntryPoint>
pub fn take_entry_points(self) -> Vec<EntryPoint>
Takes all entry points.
Trait Implementations§
source§impl Clone for EntryPoints
impl Clone for EntryPoints
source§fn clone(&self) -> EntryPoints
fn clone(&self) -> EntryPoints
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EntryPoints
impl Debug for EntryPoints
source§impl Default for EntryPoints
impl Default for EntryPoints
source§impl From<Vec<EntryPoint>> for EntryPoints
impl From<Vec<EntryPoint>> for EntryPoints
source§fn from(entry_points: Vec<EntryPoint>) -> EntryPoints
fn from(entry_points: Vec<EntryPoint>) -> EntryPoints
Converts to this type from the input type.
source§impl FromBytes for EntryPoints
impl FromBytes for EntryPoints
source§impl PartialEq for EntryPoints
impl PartialEq for EntryPoints
source§fn eq(&self, other: &EntryPoints) -> bool
fn eq(&self, other: &EntryPoints) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for EntryPoints
impl Serialize for EntryPoints
source§impl ToBytes for EntryPoints
impl ToBytes for EntryPoints
source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the length of the
Vec<u8>
which would be returned from a successful call to
to_bytes()
or into_bytes()
. The data is not actually serialized, so this call is
relatively cheap.impl Eq for EntryPoints
impl StructuralEq for EntryPoints
impl StructuralPartialEq for EntryPoints
Auto Trait Implementations§
impl RefUnwindSafe for EntryPoints
impl Send for EntryPoints
impl Sync for EntryPoints
impl Unpin for EntryPoints
impl UnwindSafe for EntryPoints
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more