farmap 0.10.1

A library for working with Farcaster label datasets
Documentation
1
2
3
4
5
6
7
8
9
use crate::is_user::IsUser;

/// Create from [`IsUser`].
///
/// This trait is preferred to the more general [`TryFrom`] because it is likely that you want to create from something that itself implements [`IsUser`], which is not allowed for [`TryFrom`].
pub trait TryFromUser<'a, T: IsUser<'a>>: Sized {
    type Error;
    fn try_from_user(value: T) -> Result<Self, Self::Error>;
}