You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The #[filler(empty_value=value)] is implemented. However, we do not need so much macros. The filler rely on is_empty function. The user can implement the is_empty for his customized struct. We will consider add #[filler(empty=fn)]
#[derive(struct_patch::Filler,Debug,PartialEq,Default)]structColor{R:u8,G:u8,B:u8,#[filler(empty_value=0)]// or #[filler(default_is_empty)]alpha:u8,}
The text was updated successfully, but these errors were encountered:
The #[filler(full=fn)], #[filler(full_value=value)], and #[filler(default_is_empty)] will not implement. Because user can add filler to gather before applying so the fulls are not useful, and the #[filler(default_is_empty)] can be replaced by #[filler(empty=default)].
yanganto
changed the title
Define empty and full of field with Filler?
Define empty for Filler?
Apr 28, 2025
The
#[filler(empty_value=value)]
is implemented. However, we do not need so much macros. The filler rely onis_empty
function. The user can implement theis_empty
for his customized struct. We will consider add#[filler(empty=fn)]
The text was updated successfully, but these errors were encountered: