pub struct CustomObject<'a> { /* private fields */ }Expand description
An object type definition in Varlink IDL (struct-like with named fields).
Implementations§
Source§impl<'a> CustomObject<'a>
impl<'a> CustomObject<'a>
Sourcepub const fn new(
name: &'a str,
fields: &'a [&'a Field<'a>],
comments: &'a [&'a Comment<'a>],
) -> Self
pub const fn new( name: &'a str, fields: &'a [&'a Field<'a>], comments: &'a [&'a Comment<'a>], ) -> Self
Creates a new object type with the given name, borrowed fields, and comments.
Sourcepub fn new_owned(
name: &'a str,
fields: Vec<Field<'a>>,
comments: Vec<Comment<'a>>,
) -> Self
pub fn new_owned( name: &'a str, fields: Vec<Field<'a>>, comments: Vec<Comment<'a>>, ) -> Self
Creates a new object type with the given name, owned fields, and comments.
Trait Implementations§
Source§impl<'a> Clone for CustomObject<'a>
impl<'a> Clone for CustomObject<'a>
Source§fn clone(&self) -> CustomObject<'a>
fn clone(&self) -> CustomObject<'a>
Returns a duplicate 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<'a> Debug for CustomObject<'a>
impl<'a> Debug for CustomObject<'a>
Source§impl<'a> Display for CustomObject<'a>
impl<'a> Display for CustomObject<'a>
Source§impl<'a> From<CustomObject<'a>> for CustomType<'a>
impl<'a> From<CustomObject<'a>> for CustomType<'a>
Source§fn from(obj: CustomObject<'a>) -> Self
fn from(obj: CustomObject<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> PartialEq for CustomObject<'a>
impl<'a> PartialEq for CustomObject<'a>
impl<'a> Eq for CustomObject<'a>
Auto Trait Implementations§
impl<'a> Freeze for CustomObject<'a>
impl<'a> RefUnwindSafe for CustomObject<'a>
impl<'a> Send for CustomObject<'a>
impl<'a> Sync for CustomObject<'a>
impl<'a> Unpin for CustomObject<'a>
impl<'a> UnwindSafe for CustomObject<'a>
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