pub struct Service { /* private fields */ }
Expand description
Combines a receiver, constructor, destructor and multiple methods in one entity.
Implementations
sourceimpl Service
impl Service
pub fn new(
constructors: Vec<Function>,
destructor: Function,
methods: Vec<Function>
) -> Self
sourcepub fn assert_valid(&self)
pub fn assert_valid(&self)
Checks if the signature of this service is compatible with the Service
pattern, panic with
error message otherwise.
This function is mainly called during compile time therefore panicking with a good error message is beneficial.
pub fn the_type(&self) -> &OpaqueType
pub fn constructors(&self) -> &[Function]
pub fn destructor(&self) -> &Function
pub fn methods(&self) -> &[Function]
sourcepub fn common_prefix(&self) -> String
pub fn common_prefix(&self) -> String
Returns the longest common prefix all methods of this service share.
Trait Implementations
sourceimpl From<Service> for LibraryPattern
impl From<Service> for LibraryPattern
sourceimpl Ord for Service
impl Ord for Service
sourceimpl PartialOrd<Service> for Service
impl PartialOrd<Service> for Service
sourcefn partial_cmp(&self, other: &Service) -> Option<Ordering>
fn partial_cmp(&self, other: &Service) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Service
impl StructuralEq for Service
impl StructuralPartialEq for Service
Auto Trait Implementations
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnwindSafe for Service
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more