mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2026-01-12 17:58:15 +01:00
22 lines
801 B
C#
22 lines
801 B
C#
using System.Collections.Immutable;
|
|
using MemoryPack;
|
|
|
|
namespace Phantom.Common.Data.Web.Users;
|
|
|
|
[MemoryPackable]
|
|
[MemoryPackUnion(tag: 0, typeof(UserNotFound))]
|
|
[MemoryPackUnion(tag: 1, typeof(PasswordIsInvalid))]
|
|
[MemoryPackUnion(tag: 2, typeof(UnknownError))]
|
|
public abstract partial record SetUserPasswordError {
|
|
private SetUserPasswordError() {}
|
|
|
|
[MemoryPackable(GenerateType.VersionTolerant)]
|
|
public sealed partial record UserNotFound : SetUserPasswordError;
|
|
|
|
[MemoryPackable(GenerateType.VersionTolerant)]
|
|
public sealed partial record PasswordIsInvalid([property: MemoryPackOrder(0)] ImmutableArray<PasswordRequirementViolation> Violations) : SetUserPasswordError;
|
|
|
|
[MemoryPackable(GenerateType.VersionTolerant)]
|
|
public sealed partial record UnknownError : SetUserPasswordError;
|
|
}
|